- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NjExNjQsIm5iZiI6MTcyNDU2MDg2NCwicGF0aCI6Ii83MjM0MDI5NC8zMzc2MjI0NjctMTY1MmZjY2QtMjQxNy00ZDNmLThiNTUtNmQ2ZThkMDkzZjYzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA0NDEwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ5ZmM1Yzc3N2E2YWYxMzU1MTkxNWNiMjdlZTMwYTkwZGM5NmFkNjZhN2E2Yjk2ZDdlZTA0ZTA2M2UzMWJlOTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bZ7ZNDHgKKV5KQSuUqIm1BhWL4Fr-nmZa5f86_yGn-8)
- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NjExNjQsIm5iZiI6MTcyNDU2MDg2NCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM4OTgtY2FhMDYzYzgtZjc3Mi00MmRmLThiNGItNzdmNGEzMDJhYjBhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA0NDEwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg1OTFiMDQ3MzU5MDliOTYxNDZmYWEyYzIxYWZlZmE5ZGJiMmVlYmZhZWVlYjExODg2OTYxYmQwNDQ0M2I5YTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KxpUD9Uw9rXpX-FVtqKw6UlqmDVVVhdIcbbBk0eQ2q8)
ScheduleCalendar(
schedules = schedules,
isMondayFirst = false
)
![일요일 first](https://private-user-images.githubusercontent.com/72340294/337833899-144fa044-52f8-4bc9-887e-4f36f29e92c4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NjExNjQsIm5iZiI6MTcyNDU2MDg2NCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM4OTktMTQ0ZmEwNDQtNTJmOC00YmM5LTg4N2UtNGYzNmYyOWU5MmM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA0NDEwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA4ZjdlNzY4MTExOTZiNTYwOWI1ZWZmNTk3YzAzOGJmZWEzYTY2MTk3MzY1MzlhODI5ZDBmZjMxZDNjYmFhOGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2CERn8C3eG2JwT4vMJ7dfsEj7wBBTLD0TjBLEq9UYE0)
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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NjExNjQsIm5iZiI6MTcyNDU2MDg2NCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDAtOGJiMjY0NDQtOWVjNS00YTdkLTgxMmUtN2E2MmRjMGE0MjBhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA0NDEwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI4ZmU2MTU1NzU3MmFlZTRkMjdkNGZjMWI0YjQyNzAzYzMyNjQ1MTI1MjA2Y2Q2MDQxMTM5ZmRmNmM4NDI0ZjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ThpE0_aiTZ_D66eXR_K1X8yJhKCLnSMT6ZT7732YDo4)
- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NjExNjQsIm5iZiI6MTcyNDU2MDg2NCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDEtOWIyZDAzYmYtNjkwNi00MDRiLWIzYjgtNzM1NWNlZGY3MTQ3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA0NDEwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUyMDIxYWY2YjhjNjdhNDNmMmE1ODMyNDNjNTU3MWVlNDI5NmU5YTkyYWZlOGY5NGZkYTc5NGExZmMzNDQ0YmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hTooKebCG6FOTmn9x57uHWaT5Xuj2wbTpUk5YMhMSbw)
- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NjExNjQsIm5iZiI6MTcyNDU2MDg2NCwicGF0aCI6Ii83MjM0MDI5NC8zMzc4MzM5MDItMDU4NmVlNWEtNWZmOS00MTliLWE5OGQtZThjZDIzZjJmMTkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA0NDEwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJmOGI0OGU2ZDRhNGQ3ZjgxY2I0MzNlNTU4YzdiZmMzOWEzMjkwNDhlNjQ5NDU4ODE3NDNhMTJkNjBiNzE0MTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.CJhbEwaofvFpiFt1qzwj9-zgM04CEHuzAzv7fJSWbRY)
This project is licensed under the MIT License - see the LICENSE file for details.