Fixed
Status Update
Comments
jn...@google.com <jn...@google.com>
mk...@google.com <mk...@google.com>
mk...@google.com <mk...@google.com>
ap...@google.com <ap...@google.com> #2
A couple of questions:
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
st...@google.com <st...@google.com>
ty...@gmail.com <ty...@gmail.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
Description
Version used: Alpha20
`modifier.edgeSwipeToDismiss(state)` doesn't help as I don't have the state, it's internal in SwipeDismissableNavHost.
```
@Composable
fun WearApp() {
val navController = rememberSwipeDismissableNavController()
Scaffold(
modifier = Modifier.fillMaxSize(),
) {
SwipeDismissableNavHost(
navController = navController,
startDestination = "start",
) {
composable(route = "start") {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Button(onClick = { navController.navigate("second") }) {
Text("Pager")
}
}
}
composable(route = "second") {
val state = rememberPagerState()
val shape = if (LocalConfiguration.current.isScreenRound) CircleShape else null
Box(
modifier = Modifier.fillMaxSize()
) {
HorizontalPager(
modifier = Modifier.fillMaxSize(),
count = 10,
state = state
) { page ->
Box(
modifier = Modifier.fillMaxSize().run {
if (shape != null) {
clip(shape)
} else {
this
}
}
) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Text(text = "Screen $page")
}
}
}
val pagerScreenState = remember { PageScreenIndicatorState(state = state) }
if (pagerScreenState.pageCount > 0) {
HorizontalPageIndicator(pageIndicatorState = pagerScreenState)
}
}
}
}
}
```