更改Android 5.0的Datepicker对话框颜色是否可以更改android 5.0的datepicker(以及timepicker)配色方案?我尝试设置强调色,但这不起作用(有和没有android:):<!-- colorPrimary is used for the default action bar background --><item name="colorPrimary">@color/purple</item><!-- colorPrimaryDark is used for the status bar --><item name="colorPrimaryDark">@color/purple_tint</item><!-- colorAccent is used as the default value for colorControlActivated which is used to tint widgets --><item name="colorAccent">@color/purple_tint</item>来自原文: 对于这样的事情:
3 回答
慕村9548890
TA贡献1884条经验 获得超4个赞
试试这个,为我工作
把两个选项,colorAccent
和android:colorAccent
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> .... <item name="android:dialogTheme">@style/AppTheme.DialogTheme</item> <item name="android:datePickerDialogTheme">@style/Dialog.Theme</item></style><style name="AppTheme.DialogTheme" parent="Theme.AppCompat.Light.Dialog"><!-- Put the two options, colorAccent and android:colorAccent. --> <item name="colorAccent">@color/colorPrimary</item> <item name="android:colorPrimary">@color/colorPrimary</item> <item name="android:colorPrimaryDark">@color/colorPrimaryDark</item> <item name="android:colorAccent">@color/colorPrimary</item> </style>
- 3 回答
- 0 关注
- 1468 浏览
添加回答
举报
0/150
提交
取消