https://kotlinlang.org logo
#compose
Title
# compose
a

allan.conda

05/18/2022, 6:09 PM
Is it expected that
HorizontalPager
immediately composes adjacent pages other than the current page? I don’t want my
LaunchedEffect
to run if the page is not visible yet, or is it expected that I check for
pagerState.currentPage
?
y

yschimke

05/18/2022, 6:13 PM
This is expected, and I believe Accompanist removed the config for it. It makes sense since when you swipe you have 2 on screen at the same time.
Using pagerState.currentPage is exactly how I handled it.
a

allan.conda

05/18/2022, 6:36 PM
I see. Do you have a reference to a discussion around it?
The
offscreenLimit
parameter has been removed. We no longer have control of what items are laid out 'off screen'.
👍 1
2 Views