Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

joelkanyi/HorizontalCalendarView

Repository files navigation

HorizontalCalendarView


📆 A Jetpack Compose Horizontal Calendar View Library for your Android projects.


Including it in your project:

Step 1. Add the JitPack repository to your settings.gradle file

    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

Step 2. Add the dependency

    dependencies {
        implementation 'com.github.JoelKanyi:HorizontalCalendarView:1.0.4'
    }

Usage

Add the HorizontalCalendarView composable into your project and customize it according to your needs:

HorizontalCalendarView(
    modifier = Modifier,
    selectedTextColor = Color.White,
    unSelectedTextColor = Color.Black,
    selectedCardColor = Color.Blue,
    unSelectedCardColor = Color.LightGray,
    onDayClick = { day ->
        Toast.makeText(context, day.toString(), Toast.LENGTH_SHORT).show()
    }
)

Demo


License

Copyright 2023 Joel Kanyi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.