A Custom Calendar Library based on Kotlin MVVM architecture and compose
- Kotlin 100% coverage
- Jetpack
- Compose
- ViewModel that stores, exposes and manages UI state
- MutableState
- Hilt for dependency injection
- There are three calendar view : Month/One Week/Two Week
- Swiping left or right to change calendar page
- Providing three calendar theme : EarthTones/Light/Dark
- Setting which day is the start day of week
- Add the JitPack repository to settings.gradle
dependencyResolutionManagement {
repositories {
maven { url "https://jitpack.io" }
}
}- Add the dependency
dependencies {
implementation 'com.github.winniecake:custom-calendar:1.0.2'
}- Add WCalendar composable
WCalendar(
modifier = Modifier.fillMaxWidth().wrapContentHeight(),
type = WCalendarPeriod.Month,
startDayOfWeek = WCalendarStartDayOfWeek.SUNDAY,
theme = WCalendarThemeName.EarthTones,
onDaySelected = { date -> }
)

