Android_My_Refined_Calendar provides Android's Calendar View of beautiful and simple design.
Step 1. Add it in your root build.gradle at the end of repositories
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.5ionnim:Android_My_Refined_Calendar:${version}'
}
Step 1. Add CalendarPager
into your layouts or view hierarchy.
like this. (you can set minimum year and maximum year by adding 'minYear' and 'maxYear' attributes)
<sionnim.android.refinedcalendar.CalendarPager
android:id="@+id/calendarPager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:minYear="1995"
app:maxYear="2030"/>
Step 2. Set CalendarPager.setOnPageSelectedListener
and CalendarPager.setOnItemClickListener
when you need it.
Or if you need to move page of CalendarPager you can call CalendarPager.moveCalendarPage()
.
you can see the example here
it's specified in the LICENSE file.