改变分频器颜色的Andr​​oid DatePicker的对话 [英] Change Divider Color Android DatePicker Dialog

查看:191
本文介绍了改变分频器颜色的Andr​​oid DatePicker的对话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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>

然后打开你的的Andr​​oidManifest.xml 文件。并找到安卓主题 replcae机器人:主题=@风格/ MyTheme的

这篇关于改变分频器颜色的Andr​​oid DatePicker的对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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