Good Morning, I'm developing a new Wear OS application. The thing is, I can't find anywhere how to make a good pagination .
I would like to change activity on swipe (no matter if it's vertical or horizontal) but can't find anywhere how to do it...
Maybe I should not navigate in my app like that ? Can you help me if you have any answer on how to do it ?
thanks ! (for some reasons I can't say hello on my post ?)
You can use HorizontalPager or VerticalPager from Accompanist.
https://google.github.io/accompanist/pager/
HorizontalPager(
modifier = Modifier.fillMaxSize(),
count = 10,
state = state
) { page ->
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Text(text = "Screen $page")
}
}
If you want something more custom, then it's probably a serious investment in a component. Especially if it needs to work with the system Swipe to Dismiss.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.