diff options
| author | Alan Viverette <alanv@google.com> | 2014-08-15 14:20:35 -0700 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2014-08-15 14:20:35 -0700 |
| commit | 518ff0de95e64116ecb07706fc564d4c19197ca7 (patch) | |
| tree | 671ae5da4fcb42c9fdfb7da9f96005a37aa80eea /core/java/android/widget/RadialTimePickerView.java | |
| parent | 4473ec5a5b39248377ce1596cdae83715b513413 (diff) | |
Fix date and time picker styling
Removes done buttons from widgets, fixes date picker day selection, fixes
dialog layouts in landscape, updates colors. Adds API on AlertDialog for
setting the view by resource ID, which is necessary to correctly inflate
the view against the dialog's parent view.
BUG: 16941550
BUG: 16852521
BUG: 16878697
BUG: 16838659
BUG: 17047435
Change-Id: I138858ce06cd4abf68a2c3361ec170370236b33b
Diffstat (limited to 'core/java/android/widget/RadialTimePickerView.java')
| -rw-r--r-- | core/java/android/widget/RadialTimePickerView.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/widget/RadialTimePickerView.java b/core/java/android/widget/RadialTimePickerView.java index 3d2f67f7c115..adca4ccdaaed 100644 --- a/core/java/android/widget/RadialTimePickerView.java +++ b/core/java/android/widget/RadialTimePickerView.java @@ -85,7 +85,7 @@ public class RadialTimePickerView extends View implements View.OnTouchListener { private static final int ALPHA_TRANSPARENT = 0; // Alpha level of color for selector. - private static final int ALPHA_SELECTOR = 255; // was 51 + private static final int ALPHA_SELECTOR = 60; // was 51 // Alpha level of color for selected circle. private static final int ALPHA_AMPM_SELECTED = ALPHA_SELECTOR; @@ -105,7 +105,7 @@ public class RadialTimePickerView extends View implements View.OnTouchListener { private static final int CENTER_RADIUS = 2; - private static final int[] STATE_SET_SELECTED = new int[] { R.attr.state_selected }; + private static final int[] STATE_SET_SELECTED = new int[] {R.attr.state_selected}; private static int[] sSnapPrefer30sMap = new int[361]; @@ -337,6 +337,9 @@ public class RadialTimePickerView extends View implements View.OnTouchListener { // list doesn't have a state for selected, we'll use this color. final int amPmSelectedColor = a.getColor(R.styleable.TimePicker_amPmSelectedBackgroundColor, res.getColor(R.color.timepicker_default_ampm_selected_background_color_material)); + amPmBackgroundColor = ColorStateList.addFirstIfMissing( + amPmBackgroundColor, R.attr.state_selected, amPmSelectedColor); + mAmPmSelectedColor = amPmBackgroundColor.getColorForState( STATE_SET_SELECTED, amPmSelectedColor); mAmPmUnselectedColor = amPmBackgroundColor.getDefaultColor(); |
