3

Hi I'am trying to change DatePicker Header text color, but I can't find attribute to change this. I want to change header color to white(I know how to do that) and Header text color to Black.

image

SOLUTION:

<style name="MyDatePickerStyle" parent="@android:style/Widget.Material.DatePicker">
    <item name="android:headerBackground">#ffffff</item>
    <item name="android:textColorPrimary">#000000</item>
</style>
remes
  • 67
  • 2
  • 8
  • check my answer here on > **Change DatePicker header text color** http://stackoverflow.com/a/42460022/5188159 – Charuක Feb 26 '17 at 03:23

1 Answers1

4

Xml

        <DatePicker
        android:id="@+id/start_date_text"
        android:layout_width="400dp"
        android:layout_height="190dp"
        android:datePickerMode="spinner"
        android:calendarViewShown="false"
        style="@style/MyDatePicker" />

And style

<style name="MyDatePicker" parent="android:Widget.Material.Light.DatePicker">
     <item name="android:textColorPrimary">@color/Black</item>
</style>
Ekalips
  • 1,473
  • 11
  • 20