Hi guys, I try to create test application and I need to implement pagination for LazyColumnItems. But I couldn't find how to get current visible item position to trigger loading of next page. Should I just get index of itemContent and compare it with items count?
m
molikto
06/30/2020, 12:05 PM
Currently there is no support for it. I've seen a PR experiment to add API for this, but not merged yet. I guess they are still not sure what kind of API is the best
molikto
06/30/2020, 12:06 PM
It is pretty easy to add though, if you are willing to make the extra effort to change & compile Compose yourself. (Edit: you can also copy the code out
a
Andrey Kulikov
06/30/2020, 12:06 PM
hey! unfortunately this is not yet supported, but planned. maybe you can try to temporary implement it manually if you add Modifier.onPositioned() for the last item and do your logic when the boundsInRoot are not empty - which means visible
v
vityokkv73
06/30/2020, 12:35 PM
Thanks, guys, it's just test project, so I can try any working solutions :)
a
amar_1995
06/30/2020, 2:33 PM
Where is this PR experiment API. Can anyone please provide a link