我怎样才能改变我的timepicker和日期选择器的文本颜色? [英] How can i change the textcolor of my timepicker and datepicker?

查看:157
本文介绍了我怎样才能改变我的timepicker和日期选择器的文本颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我的工作我的第一个应用程序之一。在这个应用程序,我有一个 TimePicker 的DatePicker 。我现在的活动有一个黑暗的背景。现在,我想要一个白色的文本颜色在我的 TimePicker / 的DatePicker

Currently I am working on one of my first applications. In this application I have a TimePicker and a DatePicker. My current Activity has a dark background. Now I want a white textcolor in my TimePicker/DatePicker.

在我的布局,我已经定义了我的采摘:

In my layout I have defined my pickers:

<DatePicker android:id="@+id/dpDateOfValue" android:calendarViewShown="false" />
<TimePicker android:id="@+id/tpTimeOfValue" />

该解决方案应该在2.3 - 4.1

The solution should work on 2.3 - 4.1

推荐答案

使用:

<style name="MyHolo" parent="android:Theme.Holo.NoActionBar">

        ...

        <item name="android:editTextColor">#000000</item>
</style>

要设置TimePicker文本颜色的API> = 11

to set TimePicker text color for API >= 11

这篇关于我怎样才能改变我的timepicker和日期选择器的文本颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆