- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MDI3NTMsIm5iZiI6MTcyMjgwMjQ1MywicGF0aCI6Ii83MjM0MDI5NC8zMzc2MjI0NjctMTY1MmZjY2QtMjQxNy00ZDNmLThiNTUtNmQ2ZThkMDkzZjYzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA0VDIwMTQxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlM2E2ZDcwZjJjNGNjY2QwNTVkMTFlMGQ2NzRiZmExNDQzYzZlMTk2NzEzMmE2Yzk2ZmJiZDFlYTk5ODI5ZmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.uorLJwLjxgj9bLCvrAqL9LkSMZQup7fpCwf1ioyFWwY)
- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MDI3NTMsIm5iZiI6MTcyMjgwMjQ1MywicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM4OTgtY2FhMDYzYzgtZjc3Mi00MmRmLThiNGItNzdmNGEzMDJhYjBhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA0VDIwMTQxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZlYjJhYzJkMzk2YmM3MTFhZGJhNGVmNWI0ZmUyNmJhNTEyNGRjYjgxNzIxYjQyNTdkYjhiYzYxNjM1ZWQ4M2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pXKWt25zpDh8LzVIGE_n0q9ak-wQNQxz5SNC_fQ-8Cg)
ScheduleCalendar(
schedules = schedules,
isMondayFirst = false
)
![일요일 first](https://private-user-images.githubusercontent.com/72340294/337833899-144fa044-52f8-4bc9-887e-4f36f29e92c4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MDI3NTMsIm5iZiI6MTcyMjgwMjQ1MywicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM4OTktMTQ0ZmEwNDQtNTJmOC00YmM5LTg4N2UtNGYzNmYyOWU5MmM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA0VDIwMTQxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg0N2UyMTJiNmQyYjRjZDI0ZTc5ODRiOGQ2ODNjMDFkMDgxMDM3OGUzNWVkZTIyY2FjMDQ3NWQxYmU0ZDJhMWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vJVv8TWLdZxt5euw5LE95s_2VlDltMTNyb6rkZo5zOw)
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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MDI3NTMsIm5iZiI6MTcyMjgwMjQ1MywicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDAtOGJiMjY0NDQtOWVjNS00YTdkLTgxMmUtN2E2MmRjMGE0MjBhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA0VDIwMTQxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU0MGVkYmNlNWE5YTY4MTFiMjEzNjZhYTY5ODkyODhjOGU4NDg4YTg2OWQ1N2E3YmUxN2JkMmZlNzE3YTY3ZGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wHvemBTXe5_kLgfFoVBN0GRnfAPqyMUW7K1kRPMco-s)
- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MDI3NTMsIm5iZiI6MTcyMjgwMjQ1MywicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDEtOWIyZDAzYmYtNjkwNi00MDRiLWIzYjgtNzM1NWNlZGY3MTQ3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA0VDIwMTQxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkYjNmMTMyZWY2ODY4MmZmMDY3MjAzNmFhYzg0YTk1MTJkNmZjNTUwMDYzNTk2OWE4MGE3MDJlZjY5OTI3MWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IFnL0cFjnOgE1_rTBBm0chvDTVxRZJw3caLDKNasWps)
- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MDI3NTMsIm5iZiI6MTcyMjgwMjQ1MywicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDItMDU4NmVlNWEtNWZmOS00MTliLWE5OGQtZThjZDIzZjJmMTkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA0VDIwMTQxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRmMmVlNmMzMjlkODY3MjAwNDJhMTk3ZTliZDZjYWNkZWU0ZDk5NDUxZDI1ZDNiNTJmZmM5Zjc0ZTcxNzRlYzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0nxRjw4vm2-jmTwktD2p1RgDK2FFpbMgTs2j9q0r26w)
This project is licensed under the MIT License - see the LICENSE file for details.