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
There's a little more context in
st...@google.com <st...@google.com>
ty...@gmail.com <ty...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 013365e5bd19899250054dabe311f3bc9d8837e9
Author: Zach Klippenstein <klippenstein@google.com>
Date: Thu Oct 20 10:32:31 2022
Add some tests for TestMonotonicFrameClock's current behavior.
This is in preparation for modifying the clock to include a custom
continuation interceptor.
Bug: b/254115946
Test: TestMonotonicFrameClockTest
Change-Id: I771b25673c96b41f8501600677dfcbe3ff9fb6fc
M compose/ui/ui-test/build.gradle
A compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/PhaseOrderingTest.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/TestMonotonicFrameClockTest.kt
A compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/util/TestCounter.kt
https://android-review.googlesource.com/2260388
Branch: androidx-main
commit 013365e5bd19899250054dabe311f3bc9d8837e9
Author: Zach Klippenstein <klippenstein@google.com>
Date: Thu Oct 20 10:32:31 2022
Add some tests for TestMonotonicFrameClock's current behavior.
This is in preparation for modifying the clock to include a custom
continuation interceptor.
Bug:
Test: TestMonotonicFrameClockTest
Change-Id: I771b25673c96b41f8501600677dfcbe3ff9fb6fc
M compose/ui/ui-test/build.gradle
A compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/PhaseOrderingTest.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/TestMonotonicFrameClockTest.kt
A compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/util/TestCounter.kt
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)
}
}
}
}
}
```