改变分频器颜色的Android DatePicker的对话 [英] Change Divider Color Android DatePicker Dialog
问题描述
I'm搭售改变的DatePicker对话的分颜色。
I´m tying to change the divider color of the DatePicker Dialog.
我创建的样式:
<style name="dialog_custom" parent="@android:style/Widget.DatePicker">
<item name="android:divider">@drawable/dialog_divider</item>
</style>
和创建像这
和结果是这
分频器不改变颜色,并且对话框乘坐内容的大小。
The divider no change color and the dialog take the content size..
推荐答案
您可以用主题做到这一点。检查接受的答案对这个<一个href=\"http://stackoverflow.com/questions/9688724/change-basic-theme-color-of-android-application\">question.我认为这将帮助你。
You can do this using theme. Check accepted answer on this question. i think it will helpful to you.
更新
展开 RES
文件夹中的应用程序,并展开值
文件夹中。然后创建的themes.xml
在文件值
文件夹中。然后替换所有code在的themes.xml
文件低于code。
Expand res
folder in your application and expand values
folder. Then create themes.xml
file on values
folder. then replace all code in themes.xml
file with below code.
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="MYTheme" parent="@android:style/Theme">
<item name="android:divider">@drawable/dialog_divider</item>
</style>
</resources>
然后打开你的的AndroidManifest.xml
文件。并找到安卓主题
和 replcae机器人:主题=@风格/ MyTheme的
这篇关于改变分频器颜色的Android DatePicker的对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!