hey quick question on ``` java.lang.IllegalArgume...
# compose
a
hey quick question on
Copy code
java.lang.IllegalArgumentException: LazyHorizontalGrid's height should be bound by parent.
We started receiving this when we moved to the standard
LazyHorizontalGrid
implementation in 1.2.0 (we're on rc01). This lives within a
LazyVerticalGrid
(full span). Does this mean we need to fix the height of the grid within this container (no way for the content to speak to its size)
s
When you get an infinitely wide list, it’s always wise to keep a fixed height, otherwise problems arise as I understand. Relevant discussion here https://kotlinlang.slack.com/archives/CJLTWPH7S/p1650551844988929?thread_ts=1650546872.176159&cid=CJLTWPH7S
a
thanks for the response. the horizontal content is also a grid with items that may change in height / size.
so we cannot easily lock its height to a specific value
we can use a
LazyRow
no problem, and we can mimic a grid this way
but we lose the power of the new APIs with contentType and keys
s
Aha I see what you mean now. Kind of like a calendar view which is scrollable in all directions. I am not gonna lie then, I don’t know what else to suggest and I am not sure of how to achieve such a result. As I understand it, the lazy*grid API is there to achieve what the normal lazy APIs do but with the added flexibility of access to stuff like the adaptive GridCells to arrange the items in more interesting ways. Maybe someone like @Andrey Kulikov can help you more on this if it’s even achievable in the first place.
a
yeah. its sort of a complex layout where we have content scrollable vertical with items in a full row, or in span broken columns. then we may have carousels and horizontzal grids inside that (full width span of course)
241 Views