Correct dark theme divider color for number grid
This commit is contained in:
parent
2a285c0558
commit
9588ad2b96
@ -241,7 +241,7 @@ public class NumberGridTimePickerDialog extends BaseTimePickerDialog implements
|
|||||||
mInitialMinute = minute;
|
mInitialMinute = minute;
|
||||||
mIs24HourMode = is24HourMode;
|
mIs24HourMode = is24HourMode;
|
||||||
mInKbMode = false;
|
mInKbMode = false;
|
||||||
mThemeDark = true;
|
mThemeDark = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -453,18 +453,17 @@ public class NumberGridTimePickerDialog extends BaseTimePickerDialog implements
|
|||||||
int accentColor = Utils.getThemeAccentColor(getContext());
|
int accentColor = Utils.getThemeAccentColor(getContext());
|
||||||
|
|
||||||
// Set the colors for each view based on the theme.
|
// Set the colors for each view based on the theme.
|
||||||
|
view.setBackgroundColor(mThemeDark? darkGray : white);
|
||||||
view.findViewById(R.id.time_display_background).setBackgroundColor(mThemeDark? lightGray : accentColor);
|
view.findViewById(R.id.time_display_background).setBackgroundColor(mThemeDark? lightGray : accentColor);
|
||||||
view.findViewById(R.id.time_display).setBackgroundColor(mThemeDark? lightGray : accentColor);
|
view.findViewById(R.id.time_display).setBackgroundColor(mThemeDark? lightGray : accentColor);
|
||||||
((TextView) view.findViewById(R.id.separator)).setTextColor(/*mThemeDark? white : timeDisplay*/mUnselectedColor);
|
((TextView) view.findViewById(R.id.separator)).setTextColor(/*mThemeDark? white : timeDisplay*/mUnselectedColor);
|
||||||
((TextView) view.findViewById(R.id.ampm_label)).setTextColor(/*mThemeDark? white : timeDisplay*/mUnselectedColor);
|
((TextView) view.findViewById(R.id.ampm_label)).setTextColor(/*mThemeDark? white : timeDisplay*/mUnselectedColor);
|
||||||
// view.findViewById(R.id.line).setBackgroundColor(mThemeDark? darkLine : line);
|
// view.findViewById(R.id.line).setBackgroundColor(mThemeDark? darkLine : line);
|
||||||
// TODO: darkLine is 12% white, but it shows up like 100% white. We have replaced
|
view.findViewById(R.id.divider).setBackgroundColor(mThemeDark? darkLine : line);
|
||||||
// darkLine with lightGray for now. Figure out why and come back to replace
|
|
||||||
// lightGray with darkLine.
|
|
||||||
view.findViewById(R.id.divider).setBackgroundColor(mThemeDark? lightGray : line);
|
|
||||||
// mDoneButton.setTextColor(mThemeDark? darkDoneTextColor : doneTextColor);
|
// mDoneButton.setTextColor(mThemeDark? darkDoneTextColor : doneTextColor);
|
||||||
// The AOSP timepicker originally uses these colors for the CircleView
|
// The AOSP timepicker originally uses these colors for the CircleView
|
||||||
mTimePicker.setBackgroundColor(mThemeDark? /*lightGray : circleBackground*/ darkGray : white);
|
// We already set the correct background color of the entire view tree.
|
||||||
|
// mTimePicker.setBackgroundColor(mThemeDark? /*lightGray : circleBackground*/ darkGray : white);
|
||||||
// mDoneButton.setBackgroundResource(mThemeDark? darkDoneBackground : doneBackground);
|
// mDoneButton.setBackgroundResource(mThemeDark? darkDoneBackground : doneBackground);
|
||||||
|
|
||||||
// Set the color on the FAB
|
// Set the color on the FAB
|
||||||
@ -483,7 +482,8 @@ public class NumberGridTimePickerDialog extends BaseTimePickerDialog implements
|
|||||||
// mDoneButton.setRippleColor(/*your color here*/);
|
// mDoneButton.setRippleColor(/*your color here*/);
|
||||||
|
|
||||||
// Set the color on the half-day toggles
|
// Set the color on the half-day toggles
|
||||||
view.findViewById(R.id.half_day_toggles).setBackgroundColor(mThemeDark? /*lightGray : circleBackground*/ darkGray : white);
|
// We already set the correct background color of the entire view tree.
|
||||||
|
// view.findViewById(R.id.half_day_toggles).setBackgroundColor(mThemeDark? /*lightGray : circleBackground*/ darkGray : white);
|
||||||
mHalfDayToggleSelectedColor = accentColor;
|
mHalfDayToggleSelectedColor = accentColor;
|
||||||
// mHalfDayToggleUnselectedColor = Utils.getTextColorFromThemeAttr(getContext(),
|
// mHalfDayToggleUnselectedColor = Utils.getTextColorFromThemeAttr(getContext(),
|
||||||
// // The colors are in the correct order, which happens to be the reverse of the order
|
// // The colors are in the correct order, which happens to be the reverse of the order
|
||||||
|
|||||||
@ -28,8 +28,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/number_grid_height"
|
android:layout_height="@dimen/number_grid_height"
|
||||||
android:layout_below="@id/time_display_background"
|
android:layout_below="@id/time_display_background"
|
||||||
android:paddingStart="@dimen/bottom_sheet_edge_margin"
|
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
|
||||||
android:paddingEnd="@dimen/bottom_sheet_edge_margin"
|
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"
|
||||||
android:paddingBottom="@dimen/anchored_fab_vertical_space"/>
|
android:paddingBottom="@dimen/anchored_fab_vertical_space"/>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
|||||||
@ -85,6 +85,7 @@
|
|||||||
<item name="layout_gravity">center</item>
|
<item name="layout_gravity">center</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- TODO: Consider making a dark themed Divider too. -->
|
||||||
<style name="Divider">
|
<style name="Divider">
|
||||||
<!-- Won't be visible in a bottom sheet dialog... -->
|
<!-- Won't be visible in a bottom sheet dialog... -->
|
||||||
<!--<item name="android:background">?android:attr/listDivider</item>-->
|
<!--<item name="android:background">?android:attr/listDivider</item>-->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user