oleksandrbalan / programguide

Lazy layout to display program guide data on the two directional plane.
Apache License 2.0
40 stars 7 forks source link

Dynamic program size #16

Closed ngan9elova closed 5 months ago

ngan9elova commented 5 months ago

Hey, so currently I'm trying to implement a dynamic program guide, meaning that at first I will have programs for 4 hours, after scrolling for 8 hours etc., but I get an exception when expanding the size, which I guess it's because of the items size in the minaBox. So, can you let me know if this is intended or is there a way to achieve the dynamic resizing?

java.lang.IllegalArgumentException: width(-404) and height(126) must be >= 0 at androidx.compose.ui.unit.Constraints$Companion.fixed-JhjzzOo(Constraints.kt:311) at eu.wewox.minabox.MinaBoxKt$MinaBox$1.invoke-0kLqBqw(MinaBox.kt:86) at eu.wewox.minabox.MinaBoxKt$MinaBox$1.invoke(MinaBox.kt:59)

oleksandrbalan commented 5 months ago

Hi 👋 How did you expand the size? It looks like in some case item's width is going negative, and thus leading to a crash.

ngan9elova commented 5 months ago

Just at first I had a list with programs only from 00:00 - 04:00, afterwards on scroll near the end of 04:00, I updated the list and tried adding programs for 04:00 -08:00 and keeping the previous ones as well. It updates the list, but then when trying to go past 04:00 in the other direction, I mean in direction towards 00:00 it crashes.