Ilias Zosimadis
02/13/2021, 11:48 AMJulien Salvi
02/13/2021, 12:13 PMIlias Zosimadis
02/13/2021, 3:33 PMLazyListState
? In this case, the onScroll function is internal and we don't have access to the consumed distance. Also the firstVisibleItemScrollOffset
is the offset of the first item.Shakil Karim
02/13/2021, 3:53 PMfirstVisibleItemScrollOffset
for getting offset like this
val collapseRange = with(AmbientDensity.current) { (TopItemHeight).toPx() }
val collapseFraction =
(scrollState.firstVisibleItemScrollOffset / collapseRange).coerceIn(0f, 1f)
Ilias Zosimadis
02/13/2021, 4:11 PMfirstVisibleItemScrollOffset
but I think it would be much simpler if we had access to the onScroll
function.Julien Salvi
02/13/2021, 4:15 PM