将自定义灯光主题应用于android timePicker

时间:2014-01-13 11:13:22

标签: android themes

我想将自定义灯光主题应用于Android TimePicker。目前我有这个代码:

主题描述:

<style name="MyTheme" parent="android:Theme.Holo.Light">
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
</style>

TimePicker说明:

<TimePicker
         style="@style/MyTheme"
         android:id="@+id/timePicker1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
         android:layout_below="@+id/textView3"
         android:layout_marginTop="30dp"
         android:layout_centerVertical="true" />

但是我的TimePicker的文字颜色仍然是黑色,在深色背景上看起来非常糟糕。那么我应该怎么做才能改变呢?

1 个答案:

答案 0 :(得分:0)

试试这个!
将line style =“@ style / MyTheme”更改为android:theme =“@ style / MyTheme”