Closed dylan-kwon closed 1 year ago
What version of compose do you have?
compose.compiler 1.4.3
material3 1.1.0-alpha08
etc 1.4.0-rc01
etc 1.4.0-rc01
I assume this is compose UI?
yes
Do you need sample code?
That would be great, thanks. Although compose 1.4 isn't officially supported yet.
thank you Are there any plans or timelines for compose 1.4 support?
@dylan-kwon did you find any workaround? I'm also facing this issue. I upgraded my compose version to 1.4.1 and this happened.
I bumped compose UI to 1.4 in this branch but could not reproduce this crash, could someone provide more info regarding usage/calendar setup etc.
@kizitonwose I'm using a HorizontalCalender
which is showing 12 months. 1st month is rendered fine. As soon as I scroll to the 2nd month, the app crashes and logs the error @dylan-kwon has mentioned.
I don't know how you are implementing the pagination for the calendars. But in Compose 1.4+
, Paging
is supported by compose itself (though it's experimental). Maybe, this just fixes this issue completely.
This is now fixed in the latest library snapshot. Please use the snapshot and check that it works as expected.
Snapshot url: maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
Snapshot artifact: implementation 'com.kizitonwose.calendar:compose:2.2.1-SNAPSHOT'
I will release it this week.
@kizitonwose I use this snapshot version and the problem is solved.
@kizitonwose I have one more suggestion if you can make it work. What if the calender is snapped to the middle of screen, not to the start?
@arijit4 In future versions, it should be possible to customize the snap behavior. Hoping to ship it after the coming release.
Version 2.3.0 is now released with the fix.
Library information:
Describe the bug**
java.lang.AbstractMethodError: abstract method "float androidx.compose.foundation.gestures.snapping.SnapLayoutInfoProvider.calculateSnapStepSize(androidx.compose.ui.unit.Density)"
To Reproduce (if applicable)
Steps to reproduce the behavior:
It works normally in versions below 2.1.1.