Chris Johnson
09/27/2021, 7:30 PMACTION_DOWN
and ACTION_UP
but still allow a LazyColumn to have ACTION_MOVE
for scroll? My use case is: I want to allow a full screen list to scroll, but I want to do something when a finger is lifted up such as snap the list to a specific positionZach Klippenstein (he/him) [MOD]
09/27/2021, 7:32 PMChris Johnson
09/27/2021, 7:36 PMACTION_UP
. The user could be slowly scrolling my content and when they lift their finger up I want to snap the list into place. For context, I'm basically trying to re-create the default behavior we got from the MaterialCollapsingToolbar. I have a working implementation listening for when the scrollState's isScrollInProgress
and that works to check when they've stopped scrolling, but that also causes a LOT of recompositions in a very large complex composable. So I'm trying to avoid that as it causes noticeable lag.Zach Klippenstein (he/him) [MOD]
09/27/2021, 7:38 PMderivedStateOf
to avoid recomposing on every isScrollInProgress
update.Chris Johnson
09/27/2021, 7:43 PMChris Johnson
09/27/2021, 7:44 PM