1

我正在开发一个应用程序,我需要显示一个DatePicker对话框。现在我的设计是这样的,DatePicker应该是材质设计之前的微调模式。我想它看起来像这样 - This is a dialog in which datepicker will be in the middle我可以更改Android DatePicker(模式 - 微调)选定项目的颜色吗?

我想使我的对话框的自定义视图,然后在android中使用datepicker微调,但然后我无法将所选号码的颜色更改为红色。如何将图像中所选数字的颜色更改为红色? 有人可以帮我吗?

回答

0

颜色取决于Dialog上用于充气布局的主题。 建立一个基本的主题是这样的:

<style name="PickerDialog" parent="Theme.AppCompat.Light.Dialog.Alert"> 
    <item name="colorAccent">@color/error_red</item> 
    </style> 

其中colorAccent属性适用于您想要的颜色,以你的DatePicker

+0

这没有奏效。我正在做同样的..... –

相关问题