I'm using a TimePicker into a LinearLayout with backgroundColor = black, however, I can't see the numbers in the TimePicker, and I need the background color set to black in the layout, how can I change the textColor in the TimePicker? I already tried this with no luck:
<style name="MyTimePicker" parent="@android:style/Widget.TimePicker">
<item name="android:textColor">#000000</item>
</style>
<style name="MyHoloTimePicker" parent="@android:style/Widget.Holo.TimePicker">
<item name="android:textColor">#000000</item>
</style>
I tried to assign them as styles in the TimePicker, but the Widget.TimePicker and Widget.Holo.TimePicker parent styles are not recognized in Android, I'm using:
android:minSdkVersion="8"
Could you help me out please? thank you!
You should use the style in your layout too:
<TimePicker
style="@style/MyHoloTimePicker"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
Of course you'll have to create two layouts to use both themes (API level less than 11 or greater than 11), or create your style in two different values- folders ("values" and "values-11"; refer to Android documentation).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With