What is the new `HorizontalPagerIndicator` for `an...
# compose
y
What is the new
HorizontalPagerIndicator
for
androidx.compose.foundation.pager.PagerState
? I switched from Accompanist to Compose Foundation 1.4.0-beta02, but can’t find PagerIndicator.
1
👍 1
b
You can still use the accompanist one. There isn't one in androidX
y
I can not mix the PagerState, the Accompanist HorizontalPagerIndicator doesn’t take the
androidx.compose.foundation.pager.PagerState
, can i just cast it to the Accompanist PagerState? Otherwise I have to copy over the PagerState and make duplicates.
b
You shouldn't have to, we added support for androidX pager here. https://github.com/google/accompanist/pull/1485
y
I see, thanks so much. It works now. It turns out for the
accompanist-pager-indicators 0.29.1-alpha
, I need to explicitly pass a
pageCount
in the composable
HorizontalPagerIndicator
. Otherwise the wrong composable is picked.