afohrman 7b4e6d356c Improve logic for setting box background mode.
Using a switch statement to ensure that the box background mode is only ever set to one of the BoxBackgroundMode constants. Also pulled the logic out into its own method to improve readability in the already large constructor, and added a check to make sure that the box background's GradientDrawable is only created if a background is requested.

PiperOrigin-RevId: 167194185
2017-09-21 14:44:38 -04:00
..