Skip to content

Latest commit

 

History

History
80 lines (63 loc) · 2.58 KB

README.md

File metadata and controls

80 lines (63 loc) · 2.58 KB

Compose Calendar

Overview

Compose Calendar is a sample calendar component built using Jetpack Compose for Android. It provides a customizable calendar view with various features. I encourage you to ⭐star⭐ this repository if you find it useful!

Quick Start


If you're using Groovy DSL,

//settings.gradle
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            mavenCentral()
            maven { url 'https://jitpack.io' }
        }
}
//app.gradle
dependencies {
    implementation 'com.github.lyh990517:Compose-Calendar-Template:latest-release'
}

If you're using Kotlin DSL

//settings.gradle.kts
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            google()
            mavenCentral()
            maven(url = "https://jitpack.io")
        }
}
//app.gradle.kts
dependencies {
    implementation ("com.github.lyh990517:Compose-Calendar-Template:latest-release")
}

How to Use

To use Compose Calendar in your Android app, follow these steps:

  1. Add Compose Calendar as a dependency in your project.
  2. Include the Calendar composable in your layout.
  3. Customize the calendar appearance and behavior as needed.
  4. Handle the onSelect callback to respond to date selection events.

Customization

You can customize Compose Calendar in various ways, such as changing the colors, specifying the number of months to display, and adjusting the layout. Refer to the documentation and source code for more details on customization options.

Usage Examples

Here's an example of how to use Compose Calendar in your Android app:

Calendar { selectedDate ->
    // Handle selected date here
    Toast.makeText(this, "$selectedDate", Toast.LENGTH_SHORT).show()
}

HorizontalCalendar { selectedDate ->
    // Handle selected date here
    Toast.makeText(this, "$selectedDate", Toast.LENGTH_SHORT).show()
} 

Contact

If you have any questions, suggestions, or issues, feel free to reach out to us. You can find our contact information on our GitHub repository.

We appreciate your support and contributions to Compose Calendar!