Chris Johnson
07/08/2021, 4:24 PMview.getLocalVisibleRect(rect)
in compose? Also, is there another way to get the rect of a compose view without using onGloballyPositioned
from the modifier?tad
07/08/2021, 4:39 PMlocalBoundingBoxOf(parentLayoutCoordinates)
in onGloballyPositioned
Chris Johnson
07/08/2021, 5:32 PMonGloballyPositioned
is because this needs to go in a list and that gets called an insane amount of times. I could maybe add a flag that after the first calculation to not add it to the modifier but I was hoping for a better way 😞localBoundingBoxOf
tad
07/08/2021, 5:37 PMLazyColumn
you can use LazyListState
to get the list of visible itemsChris Johnson
07/08/2021, 5:47 PMtad
07/08/2021, 5:49 PMsnapshotFlow { lazyListState.layoutInfo }
and some Flow operators to grab which items come into view, and their pixel offsetsLaunchedEffect
of courseChris Johnson
07/08/2021, 5:50 PMtad
07/08/2021, 5:51 PMAnimatedItem
from one of the compose samples, lemme dig it upvisible
) that's changed when each item comes into viewChris Johnson
07/08/2021, 6:06 PMLazyListState
although I fear I'm going to need more detailed information.tad
07/08/2021, 6:07 PMChris Johnson
07/08/2021, 6:07 PM