Join Slack
Powered by
Hi, is there an easy way to check if the `LazyColu...
# compose
g
georgiy.shur
12/28/2021, 4:05 PM
Hi, is there an easy way to check if the
LazyColumn
is scrollable? Means if its content is longer than the container.
j
John Nichol
12/28/2021, 5:06 PM
I think your would be able to work it out from
https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyListLayoutInfo#visibleItemsInfo()
- I would look at the visible item count compared to totalItemCount and then probably also check the final item offset + size against the end of the
viewportEndOffset
a
Albert Chang
12/29/2021, 4:37 AM
Did this when creating my scrollbar modifiers:
https://gist.github.com/mxalbert1996/33a360fcab2105a31e5355af98216f5a#file-scrollbar-kt-L95-L99
g
georgiy.shur
12/30/2021, 10:01 AM
Thanks guys! This is helpful.
Open in Slack
Previous
Next