'change the text color of Time Picker [android]

How can I Change the Text color of Time picker in android ..... I am having a black shadow background in my application and by default the time in Time picker is also in black so the time is not visible.... enter image description here

The default view of the time picker is

enter image description here

my XMl Entry is :

  <TimePicker
                    android:id="@+id/timePicker"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" />

android Java code is :

timePicker  = (TimePicker)findViewById(R.id.timePicker);
hour = calendar.get(Calendar.HOUR_OF_DAY);
        minute = calendar.get(Calendar.MINUTE);

    timePicker.setCurrentHour(hour);

    timePicker.setCurrentMinute(minute);


Solution 1:[1]

You could create your own XML layout for the datepicker as in the example here.

Not sure how well this will play with your activity if it is extending FragmentActivity, but should give you a start in the right direction.

Solution 2:[2]

Go to res > values > themes.xml and add an item inside style tag with attribute "android:textColorPrimary" and set the color you want.

<item name="android:textColorPrimary">@color/white</item>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MattMakes
Solution 2 divyanshu singh