hi-manshu / Kalendar

Kalendar is a powerful and customizable calendar library for Android applications. It provides a flexible and intuitive way to display and interact with calendars in your app. With Kalendar, you can easily render calendar views, handle date selection, pagination, and range selection, and customize the layout to match your app's design.
https://www.himanshoe.com
Apache License 2.0
761 stars 66 forks source link

Allow default configs to be copied and reused easily #129

Closed rafsanjani closed 1 year ago

rafsanjani commented 1 year ago

All the default configurations are marked as internal. These could be made public so that the defaults can be copied and reused whilst replacing only the properties that need to be replaced. Similar to what the official compose APIs provide. Take ButtonDefaults for instance.

https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:tv/tv-material/src/main/java/androidx/tv/material3/ButtonDefaults.kt;l=101?q=ButtonDefaults

Currently, to change the textSize of the day, you are forced to also provide size, textSize and textColor instead of being able to just do something like KalendarDayKonfig.default(textSize = 90.sp) or KalendarDayKonfig.default().copy(textSize = 90.sp)

hi-manshu commented 1 year ago

Good point actually, thanks for this. I kept them internal due to the reason that it was only for default options and someone who wants to use something else can use their own params.

But you make a valid argument, will do the change.

hi-manshu commented 1 year ago

https://github.com/hi-manshu/Kalendar/releases/tag/v1.3.2 This should be fixed in this!