- Add it in your root build.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
- Add the dependency
dependencies {
implementation 'com.github.uuranus:schedule-calendar-compose:latest_version'
}
ScheduleCalendar(
schedules = mapOf(
ScheduleDate.create(2024, 6, 1) to ScheduleInfo(
isCheckNeeded = false,
schedules = listOf(
ScheduleData(
title = "schedule1",
color = Purple,
detail = "Schedule Info 1",
)
)
),
)
)
- The data structure looks like this.
- You can set a class that contains more detailed schedule information through generics.
![스케줄 데이터 구조](https://private-user-images.githubusercontent.com/72340294/337622467-1652fccd-2417-4d3f-8b55-6d6e8d093f63.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwODkxMTAsIm5iZiI6MTcyNjA4ODgxMCwicGF0aCI6Ii83MjM0MDI5NC8zMzc2MjI0NjctMTY1MmZjY2QtMjQxNy00ZDNmLThiNTUtNmQ2ZThkMDkzZjYzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDIxMDY1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZhZGJkYjQzNWZmNjE2ZjgzOThjZWU0ZDJiMmUyZTJlYzAzZDk2OGY3MDNlZjk3N2EwNWE2OTMxMWViNzkxMjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Nfm9WSXjqLHVbtxBxWNQ2Yx5cHVi-aAJ5anTTIl5uHE)
- Starts on Monday, with no distinction in color for weekends.
![기본값 스크린샷](https://private-user-images.githubusercontent.com/72340294/337833898-caa063c8-f772-42df-8b4b-77f4a302ab0a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwODkxMTAsIm5iZiI6MTcyNjA4ODgxMCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM4OTgtY2FhMDYzYzgtZjc3Mi00MmRmLThiNGItNzdmNGEzMDJhYjBhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDIxMDY1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg1NDRiZmVkNGVjNDczNjk0ZGJjOTI0Zjg0NmZhNGM0NDY1MmU1MzE0MjkyYmMxMDRlNWMyYTljNmRlZjViM2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.29ZzxURVI7xHACrPsy91vmvGBPo4BCSATWkuQYY1ipU)
ScheduleCalendar(
schedules = schedules,
isMondayFirst = false
)
![일요일 first](https://private-user-images.githubusercontent.com/72340294/337833899-144fa044-52f8-4bc9-887e-4f36f29e92c4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwODkxMTAsIm5iZiI6MTcyNjA4ODgxMCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM4OTktMTQ0ZmEwNDQtNTJmOC00YmM5LTg4N2UtNGYzNmYyOWU5MmM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDIxMDY1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIwZTMxNzMyYzAyODBiNzA3NWFmZjVjMTFiYzE3YTFjYjk4NmM1MTk3ZTVmZWIxNTQ1MDA5M2Q0NTQzZTE1YzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8MoWtXEJqDaJ1PmUDpQvv6ToWPeptWMAhRxzWYfEWJA)
ScheduleCalendar(
schedules = schedules,
calendarColors = ScheduleCalendarDefaults.colors(
lightColors = ScheduleCalendarDefaults.defaultLightColors().copy(
saturdayColor = Blue,
sundayColor = Red
),
darkColors = ScheduleCalendarDefaults.defaultDarkColors().copy(
saturdayColor = DarkBlue,
sundayColor = DarkRed
),
)
)
![주말 색깔 first](https://private-user-images.githubusercontent.com/72340294/337833900-8bb26444-9ec5-4a7d-812e-7a62dc0a420a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwODkxMTAsIm5iZiI6MTcyNjA4ODgxMCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDAtOGJiMjY0NDQtOWVjNS00YTdkLTgxMmUtN2E2MmRjMGE0MjBhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDIxMDY1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhN2QxMzExOTc1MjA1YTM5NTljZmE4MGQ5Mjc0ZTgxMzE1Mzk0MmVjMmQ3NjcwMDFmNmRlOGEzMjBjNWFiYTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.frbrEL4LvrVRR353nPnliEOpcqt_chhH2XFlpolFyH8)
- The color of the schedule is set to the Light version and automatically changes to Dark mode.
![다크 모드 first](https://private-user-images.githubusercontent.com/72340294/337833901-9b2d03bf-6906-404b-b3b8-7355cedf7147.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwODkxMTAsIm5iZiI6MTcyNjA4ODgxMCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDEtOWIyZDAzYmYtNjkwNi00MDRiLWIzYjgtNzM1NWNlZGY3MTQ3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDIxMDY1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZlYTYxNTQwMjU1OTVmNzdjNmMwNDM3YjNlNmM3ZDQzNDYzZjkzNjUwODVmMTFkYTZhYmJmMWY1MGViY2FjOWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.a2XP7IKif-K5AyEUT2cl5buKbXjR6x4YjQGpU9Xhl5I)
- the names of the days and months to reflect the system's language and you can modify the format of the year and month.
ScheduleCalendar(
schedules = schedules,
calendarFormat = ScheduleCalendarDefaults.formats().copy(
monthHeaderFormat = "MMMM YYYY"
)
)
![시스템 언어 설정](https://private-user-images.githubusercontent.com/72340294/337833902-0586ee5a-5ff9-419b-a98d-e8cd23f2f190.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwODkxMTAsIm5iZiI6MTcyNjA4ODgxMCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDItMDU4NmVlNWEtNWZmOS00MTliLWE5OGQtZThjZDIzZjJmMTkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDIxMDY1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ4NDQwNTAzNjZhMjlkODgwZGE4M2I3NTlhN2M0YmIzM2ZlOTY0NmQ3NDExNGExY2VmOTQwYjBmY2UwYWNmOGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8Rhu508ztV31jty5Hu0Ui8etYiQs5QuINho-ReWo9bs)
This project is licensed under the MIT License - see the LICENSE file for details.