Как проверить видимость элемента списка в Jetpack Compose ⇐ Android
-
Anonymous
Как проверить видимость элемента списка в Jetpack Compose
FlatList of React Nativehas a property viewabilityConfigCallbackPairs where you can set:
viewabilityConfig: { itemVisiblePercentThreshold: 50, waitForInteraction: true, } to detect visible items of the list with threshold of 50% and after interaction or scroll.
Does Jetpack Compose also have something similar to this?
There is LazyListState with some layout info. But I wonder if there is anything built-in component/property for this use case.
Edit
I have a list of cardviews and I want to detect which card items (at least 50% of card is visible) are visible on display. But it needs to be detected only when the card is clicked or list is scrolled by user.
Источник: https://stackoverflow.com/questions/692 ... ck-compose
FlatList of React Nativehas a property viewabilityConfigCallbackPairs where you can set:
viewabilityConfig: { itemVisiblePercentThreshold: 50, waitForInteraction: true, } to detect visible items of the list with threshold of 50% and after interaction or scroll.
Does Jetpack Compose also have something similar to this?
There is LazyListState with some layout info. But I wonder if there is anything built-in component/property for this use case.
Edit
I have a list of cardviews and I want to detect which card items (at least 50% of card is visible) are visible on display. But it needs to be detected only when the card is clicked or list is scrolled by user.
Источник: https://stackoverflow.com/questions/692 ... ck-compose
Мобильная версия