【发布时间】:2024-01-15 03:55:01
【问题描述】:
在上图中(不用担心日历定位),除了所选日期的绿色之外,整个日历都是正确的主题颜色。我已经尝试了很多东西,但无法更改主题的最后一部分!我正在使用 Theme.AppCompat.Light.DarkActionBar 并通过更改 DatePickerDialogTheme 的 colorAccent 到达当前点。我也试过改变
- dayOfWeekBackground
- dayOfWeekTextAppearance
- headerMonthTextAppearance
- headerDayOfMonthTextAppearance
- headerYearTextAppearance
- headerSelectedTextColor
- yearListItemTextAppearance
- 年份ListSelectorColor
- 日历文本颜色
- calendarSelectedTextColor
而那些似乎并没有这样做。这是我的 XML,提前谢谢!
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorRed</item>
<item name="colorPrimaryDark">@color/colorRed</item>
<item name="colorAccent">@color/colorRed</item>
<item name="android:datePickerDialogTheme">@style/MyDatePickerDialogTheme</item>
</style>
<style name="MyDatePickerDialogTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:colorAccent">@color/colorRed</item>
</style>
【问题讨论】:
-
尝试改变colorControlNormal
标签: android datepicker themes android-appcompat