Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change color of TimePicker (RadialTimePickerView)?

How do I change the number/picker-color of the TimePicker/RadialTimePickerView? I can see, that the RadialTimePickerView sets its color internal by using

final int numbersTextColor = a.getColor(R.styleable.TimePicker_numbersTextColor,
            res.getColor(R.color.timepicker_default_text_color_material));

I tried adding a timepicker_default_text_color_material item to the colors.xml, but this didn't work out.

The black numbers and the blue picker should be white: The black numbers and the blue picker should be white.

like image 764
svennergr Avatar asked Jul 11 '15 18:07

svennergr


1 Answers

More or less, as Saket commented, I need to append my styles.xml:

<style name="myTimePickerStyle" parent="@android:style/Widget.Material.Light.TimePicker">
    <item name="android:numbersTextColor">#ffffff</item>
    <item name="android:numbersBackgroundColor">@color/timepicker_header</item>
    <item name="android:numbersSelectorColor">#88000000</item>
    <item name="android:headerBackground">@color/timepicker_header</item>
</style>

<style name="AppTheme" parent="AppBaseTheme">
    <item name="android:timePickerDialogTheme">@style/myTimePickerDialogStyle</item>
</style>
like image 69
svennergr Avatar answered Sep 20 '22 15:09

svennergr