Question about `LazyLayout` , I'm working on a laz...
# compose
r
Question about
LazyLayout
, I'm working on a lazy tiles based maps in Compose and using
LazyLayout
to lazily load the tiles as I scroll in both X and Y directions. The logic works well and I'm able to get the performance that I like. The only thing missing is prefetching/ pre-composing and measuring the out of bounds items. Looking at the
LazyList
implementation, it uses a modifier implementing
ModifierLocalProvider<BeyondBoundsLayout?>, BeyondBoundsLayout
, I am trying to do the same and applied to modifier to my
LazyLayout
but the
layout
function inside that implementation is never called. I know this is experimental, but any ideas on how to get the beyond bounds modifier to work ?
s
For
BeyondBoundsLayout
, your measurement logic also has to support it Check LazyListMeasure for example of such support :)
r
Oh thanks ! I'll give it a look
s
It might be the case that there's some other integration piece that I am missing, just can't remember from the top of my head If you look up usages of the method in your ide, it should highlight the missing things implemented for LazyList