FEDUSS
05/26/2023, 10:11 PMyschimke
05/26/2023, 10:17 PMyschimke
05/26/2023, 10:17 PMFEDUSS
05/27/2023, 6:40 AMFEDUSS
05/27/2023, 6:43 AMyschimke
05/27/2023, 7:15 AMFEDUSS
05/27/2023, 7:25 AMyschimke
05/27/2023, 10:44 AMyschimke
05/27/2023, 10:44 AMval swipeToDismissBoxState = rememberSwipeToDismissBoxState()
val navHostState =
rememberSwipeDismissableNavHostState(swipeToDismissBoxState = swipeToDismissBoxState)
val navController = rememberSwipeDismissableNavController()
yschimke
05/27/2023, 10:45 AMyschimke
05/27/2023, 10:46 AM@Composable
fun SamplePagerScreen(swipeToDismissBoxState: SwipeToDismissBoxState) {
PagerScreen(
modifier = Modifier.edgeSwipeToDismiss(swipeToDismissBoxState),
state = rememberPagerState {
10
}
) {
PagerItemScreen(item = "item $it")
}
}
FEDUSS
05/27/2023, 10:57 AMyschimke
05/27/2023, 11:16 AMFEDUSS
05/27/2023, 11:24 AMFEDUSS
05/29/2023, 10:38 PMFEDUSS
05/30/2023, 10:31 AMyschimke
05/30/2023, 1:10 PMyschimke
05/30/2023, 1:11 PMyschimke
05/30/2023, 1:12 PMyschimke
05/30/2023, 1:12 PMyschimke
05/30/2023, 1:13 PMscrollable(route = "BaseNav") { scrollableScaffoldContext ->
PagerScreen(
state = pagerState
) { selectedPage ->
when(selectedPage) {
0 -> PageOne(
navController = navController,
columnState = scrollableScaffoldContext.columnState
)
1 -> PageTwo(
navController = navController,
columnState = scrollableScaffoldContext.columnState
)
yschimke
05/30/2023, 1:14 PMscrollable
you'll need to use composable
and then create the ColumnState yourself. That also means for now putting the PositionIndicator and TimeText on each page.FEDUSS
05/30/2023, 1:23 PMyschimke
05/30/2023, 1:35 PMFEDUSS
06/01/2023, 7:59 AM@Composable
private fun PagerContent(
focusRequester: FocusRequester,
content: @Composable () -> Unit
) {
Scaffold(
modifier = Modifier
.focusRequester(focusRequester)
.focusable(),
timeText = {
TimeText()
},
content = {
content()
}
)
}
yschimke
06/06/2023, 8:22 AMyschimke
06/06/2023, 8:22 AMFEDUSS
07/19/2023, 7:42 AMSwipeDismissableNavHost: Current backstack entry is empty. Please ensure:
1. The current WearNavigator navigation backstack is not empty (e.g. by using androidx.wear.compose.navigation.composable to build your nav graph).
2. The last entry is not popped prior to navigation (instead, use navigate with popUpTo).
3. If the activity uses FLAG_ACTIVITY_NEW_TASK you should also set FLAG_ACTIVITY_CLEAR_TASK to maintain the backstack consistency.
And that's weird, because the parent of WearNavScaffold is only a MaterialTheme :/