将自定义的浅色主题应用于Android时间选择器

3

我希望能为Android TimePicker应用自定义的浅色主题。目前我的代码如下:

主题描述:

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

时间选择器描述:

<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

试试这个!
将行内样式style="@style/MyTheme"更改为android:theme="@style/MyTheme"


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接