FEDUSS
05/26/2023, 10:11 PMyschimke
05/26/2023, 10:17 PMFEDUSS
05/27/2023, 6:40 AMyschimke
05/27/2023, 7:15 AMFEDUSS
05/27/2023, 7:25 AMyschimke
05/27/2023, 10:44 AMval swipeToDismissBoxState = rememberSwipeToDismissBoxState()
val navHostState =
rememberSwipeDismissableNavHostState(swipeToDismissBoxState = swipeToDismissBoxState)
val navController = rememberSwipeDismissableNavController()
@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 AMyschimke
05/30/2023, 1:10 PMscrollable(route = "BaseNav") { scrollableScaffoldContext ->
PagerScreen(
state = pagerState
) { selectedPage ->
when(selectedPage) {
0 -> PageOne(
navController = navController,
columnState = scrollableScaffoldContext.columnState
)
1 -> PageTwo(
navController = navController,
columnState = scrollableScaffoldContext.columnState
)
scrollable
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()
}
)
}