Let’s use a few minutes to learn how to write a swipeable pager composable.
Accompanist provides variants for both
VerticalPager and for now it’s flagged as an
@ExperimentalPagerApi, since its api surface might still evolve. That said, I’ve tested it and this implementation works much better than the one I was diving into in this post.
For that reason I’ve decided to deprecate the post given the information on it was starting to become misleading and quite outdated given how tied it was to the component implementation details. It already served it’s purpose!
I am keeping the post entry since SEO is good enough here so it can help leading devs to the Accompanist implementation for now.
Finally, let me recommend the official Jetpack Compose samples as a really good way to get familiarized with Compose codebases and architecture 🚀
You might be interested in other posts I wrote about Jetpack Compose:
- Awaiting next animation frame using suspend
- Sneak peek into Compose ConstraintLayout
- Custom layouts, measuring and WithConstraints Composable
Stay tunned for Jetpack Compose posts 🙌