物料日期选择器选择的日期圈不在中心,如何使其适合中心?

问题描述

link to screenshot

这是我分别用于材料日历的样式,除选定的日期圈外,一切都很完美

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:windowBackground">@color/colorAppBackground</item>
    <item name="android:actionMenuTextAppearance">@style/RobotoMenuText</item>
    <item name="titleTextAppearance">@style/RobotoMenuText</item>
    <item name="android:windowIsTranslucent">true</item>
    <item name="titleTextStyle">@style/RobotoMenuText</item>
    <item name="colorSurface">@color/colorAppGreen</item>
    <item name="materialCalendarTheme">@style/CalenderTheme</item>
    <item name="materialCalendarFullscreenTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar.Fullscreen</item>
    <item name="materialCalendarStyle">@style/Widget.MaterialComponents.MaterialCalendar</item>
</style>
<style name="CalenderTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:windowBackground">@color/colorAppBackground</item>
</style>

解决方法

have to switchTheme.AppCompatTheme.MaterialComponentsBridge主题。

使用:

<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
    <!-- ...... -->
    <item name="materialCalendarStyle">@style/Widget.MaterialComponents.MaterialCalendar</item>
    <item name="materialCalendarFullscreenTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar.Fullscreen</item>
    <item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
</style>

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...