Android 原生 CalendarView 修改样式

复制代码
<CalendarView
            android:id="@+id/calendar_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="16dp"
            android:layout_marginTop="10dp"
            app:layout_constraintTop_toBottomOf="@id/tv_title"
            android:theme="@style/CalendarViewStyle"
            android:weekDayTextAppearance="@style/weekDayTextStyle" />

在style中

复制代码
<!--星期的字体样式-->
    <style name="weekDayTextStyle" parent="TextAppearance.AppCompat">
        <item name="android:textColor">#F4F5F7</item>
        <item name="android:textSize">13sp</item>
    </style>

    <style name="CalendarViewStyle">
        <!--选中后背景-->
        <item name="colorAccent">#B9EBEC</item>
        <item name="colorPrimary">@color/white</item>
        <!--选中后字体颜色-->
        <item name="android:textColorPrimaryInverse">@color/color_333333</item>
        <!--标题颜色-->
        <item name="android:textColorPrimary">@color/white</item>
    </style>

参考链接 CalendarView 修改样式

相关推荐
好的佩奇2 小时前
蓝牙之无线电与通信距离
android·flutter·蓝牙
vilya2 小时前
我把一套完整的 Python Agent 运行时塞进手机 APK:依赖闭包、Rust 轮子和三个真机坑
android
呆呆敲代码的小Y4 小时前
【实战精选面试题】C# 面试题详细解答,按难易程度排序
android·java·游戏·c#·游戏开发·unity面试题·c#面试题
思想觉悟6 小时前
SEAndroid实战
android·linux·c++
思想觉悟6 小时前
Aosp开发磨刀石之ADB速查
android·c++
应用市场8 小时前
用本机跑的开源音乐模型,给安卓小游戏做 20 秒无缝循环背景音乐
android·python·游戏开发·soundpool·音频处理
企业数字化笔记8 小时前
表单发布前怎么验收?版本引用、字段兼容和历史数据回归
android·数据挖掘·回归
生信分析笔记8 小时前
Nature 正刊 GPN-Star 基因组语言模型
android
渣渣盟8 小时前
Flink 状态管理深度剖析:从 KeyedState 到 RocksDB,状态如何存储、恢复与扩缩容
android·大数据·flink
avi91119 小时前
电影开源Jevdo - 源码介绍(vue版)没有android 和 没有wpf
android·wpf·框架·数据爬虫·meego·电影管理