yannecer / NCalendar

一款安卓日历,仿miui,钉钉,华为的日历,万年历、365、周日历,月日历,月视图、周视图滑动切换,农历,节气,Andriod Calendar , MIUI Calendar,小米日历

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to change background color of calendar and today background.

kalaiarasisp opened this issue · comments

commented

I tried to change the background color of the calendar and today's background.
app:calendarBackground="@color/red" // showing white bg
app:todayCheckedBackground="@color/blue" // showing transparent bg

attached screenshot for reference

Screen Shot 2020-05-14 at 7 06 31 PM

use shape resources
like

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">

    <solid android:color="@color/red" />
    <size
        android:width="40dp"
        android:height="40dp" />
</shape>

app:calendarBackground="@drawable/red"

commented

@kalaiarasisp I see your screenshot is the custom Adapter pattern,Custom property is invalid when in custom Adapter pattern ,You can try to change background color of calendar using drawable resource in "TestMiui10Activity"