kizitonwose / Calendar

A highly customizable calendar view and compose library for Android and Kotlin Multiplatform.
MIT License
4.67k stars 505 forks source link

collapse the monthly view into a weekly view #503

Closed JoeVX closed 10 months ago

JoeVX commented 11 months ago

Library information:

Question:

Is there a way to collapse the monthly view into a weekly view with a single row height, and have that row display the current week containing the current day?

JoeVX commented 11 months ago

What I mean is to achieve this using the same view,because I have bound a lot of data to this view, if I switch to a new weekly view, the data will need to be rebound.

kizitonwose commented 10 months ago

This is exactly what is done in the first example in the sample project, please take a look at the code: Example1Fragment.kt

kizitonwose commented 10 months ago

What I mean is to achieve this using the same view,because I have bound a lot of data to this view, if I switch to a new weekly view, the data will need to be rebound.

I see that you do not want to use the week view provided in the library as shown in the examples. Unfortunately, the month calendar view cannot be collapsed into a week view. Note that with minimal effort, the core binding logic can be extracted and reused for the month and week views so rebinding data should not be an issue.

kizitonwose commented 10 months ago

I guess I can close this issue as it is not supported in the library, feel free to reopen it if you need more help.