WAI
Status Update
Comments
so...@google.com <so...@google.com>
le...@google.com <le...@google.com> #2
I notice the same issue and LogCat shows the following message:
Google Play services out of date. Requires 3159100 but found 3136130
Google Play services out of date. Requires 3159100 but found 3136130
ne...@gmail.com <ne...@gmail.com> #3
Same here.
"Google Play services out of date. Requires 3159100 but found 3136130"
"Google Play services out of date. Requires 3159100 but found 3136130"
Description
Description:
The request is to change visibility modifier of
androidx.compose.foundation.pager.PagerState.snapToItem
and.pageAvailableSpace
to public as it makes synchronizing multiplePagerState
s much easier and/or setting scroll state in fast-paced non-coroutine scope.Use Case:
Consider the following example:
where the
stateA
andstateB
are to be synchronized in the terms ofcurrentPage
andcurrentPageOffsetFraction
.This is not an easy task as launching many
LaunchedEffect
s is not efficient and introduces extreme lag, dropping to almost 10fps on the most performant hardware.Therefore a subclass of
PagerState
is required:Where piggy-backing on the scroll method produces the wanted result in a way that's very performant. These changes are sufficient to have a clear, flexible public API for this task, however…
If it would be possible to create a
PagerState
-embedded subroutine which scrolls attached states automatically without the need forPagerState
subclass, that would be also cool. I can image the API looking similar to this:Moreover I find synchronizing generic
ScrollableState
(or Lazy*-owned) with the Pager could lead to easier Pager Indicator integration if it were implemented.