kizitonwose / Calendar

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

java.lang.IllegalArgumentException: The initial value must have an associated anchor. #504

Closed ParkJongJoon7128 closed 9 months ago

ParkJongJoon7128 commented 11 months ago

Library information:

compose_version = '1.4.7'
id 'org.jetbrains.kotlin.android' version '1.8.21' apply false

def new_calendar = "2.0.3"
implementation "com.kizitonwose.calendar:compose:$new_calendar"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'

Question:

When i sync this library and use this calendar(HorizontalCalendar, WeekCalendar), there is error. Specifically, after syncing this library to my project, the view structure of the screen with the calendar has changed. In particular, the location of the FAB has changed, and errors occur when you click FAB to perform any function, or when an event occurs by clicking day.

Even if I search for this error by Googling, the only related symptoms are BottomSheet contents, so I register issue.

image

error java.lang.IllegalArgumentException: The initial value must have an associated anchor.

kizitonwose commented 10 months ago

Hi, can you please add some repro steps?

ParkJongJoon7128 commented 10 months ago

here is my project repo https://github.com/Pond-Lotus/lotus_aos

and this is the recording when i run this app untitled.zip


actually when i changed the previous other library to this library, the corresponding screen design structure is totally changed, twisted. And, since i use this library, i cant use Layout Inspector. So, i'm very confused now.

kizitonwose commented 10 months ago

Hi, the provided sample requires login and is in a language I do not understand.

ParkJongJoon7128 commented 10 months ago

oh its login screen. The first input is for 'id' and second input is for 'password'

I'll give you my account id: whdwnsdk8111@naver.com pw: whdwnsdk2!

kizitonwose commented 10 months ago

~Clicking the button does nothing~

Got it working now, taking a look.

kizitonwose commented 10 months ago

I have removed all the calendar code from the project but it is still crashing with the same error so I think the issue is not from the library.

https://github.com/kizitonwose/Calendar/assets/15170090/d690deed-5238-4b03-8224-5ff17869436e

ParkJongJoon7128 commented 10 months ago

No, since I used this library, the view structure of the calendar screen has been completely distorted, and there has been an issue.

The particular point is the FAB position. After adding this library, the FAB, which should be in its original position, has been slammed down the screen and is out of range of the screen. This is the biggest issue.

Secondly, BottomSheet's Sheet ContentHeight is not applicable. I originally declared 0.dp as the default and used it, but after adding this library, the value for 0.dp became unavailable.

I'm sure that it's library issue. Because i tried to make a new another project to solve this issue and there is nothing error on new project including BottomSheetScaffold with sheetContentHeight = 0.dp

Error java.lang.IllegalArgumentException: The initial value must have an associated anchor.

kizitonwose commented 10 months ago

I do not think I can help with this, unfortunately.

kizitonwose commented 9 months ago

Closing this as it is likely not an issue with the library itself. Please provide a way to reproduce this with the sample project included in this repo if you want further assistance.