Set pickers to use dark theme programmatically to work around library bug in which the themeDark XML attribute is not being applied.

This commit is contained in:
Phillip Hsu 2017-02-26 20:01:33 -08:00
parent 7b54878595
commit c842a3491e

View File

@ -80,6 +80,7 @@ public final class TimePickerDialogController extends DialogFragmentController<B
dialog = new NumberPadTimePickerDialog.Builder(mListener) dialog = new NumberPadTimePickerDialog.Builder(mListener)
.setHeaderColor(dialogColor) .setHeaderColor(dialogColor)
.setBackgroundColor(dialogColor) .setBackgroundColor(dialogColor)
.setThemeDark(true)
.build(); .build();
} else { } else {
dialog = new GridTimePickerDialog.Builder( dialog = new GridTimePickerDialog.Builder(
@ -89,6 +90,7 @@ public final class TimePickerDialogController extends DialogFragmentController<B
DateFormat.is24HourFormat(mContext)) DateFormat.is24HourFormat(mContext))
.setHeaderColor(dialogColor) .setHeaderColor(dialogColor)
.setBackgroundColor(dialogColor) .setBackgroundColor(dialogColor)
.setThemeDark(true)
.build(); .build();
} }
} else { } else {