and I think `HorizontalPagerScaffold` is missing a...
# compose-wear
f
and I think
HorizontalPagerScaffold
is missing a TimeText param 😅
s
As per Yuri's comment - the TimeText would go in the screen scaffold. So the layout would be something like this (from the pager scaffold sample):
Copy code
AppScaffold {
        val pagerState = rememberPagerState(pageCount = { 10 })

        HorizontalPagerScaffold(pagerState = pagerState) {
            HorizontalPager(
                state = pagerState,
                flingBehavior =
                    PagerScaffoldDefaults.snapWithSpringFlingBehavior(state = pagerState),
                rotaryScrollableBehavior = null,
            ) { page ->
                AnimatedPage(pageIndex = page, pagerState = pagerState) {
                    ScreenScaffold {
                        Column(
                            modifier = Modifier.fillMaxSize(),
                            horizontalAlignment = Alignment.CenterHorizontally,
                            verticalArrangement = Arrangement.Center,
                        ) {
                            Text(text = "Page #$page")
                            Spacer(modifier = Modifier.height(8.dp))
                            Text(text = "Swipe left and right")
                            if (page == 0) {
                                Spacer(modifier = Modifier.height(16.dp))
                                Button(onClick = navigateBack) { Text("Exit") }
                            }
                        }
                    }
                }
            }
        }
    }
Note that HorizontalPagerScaffold and AnimatedPage are in the Material3 library - HorizontalPager is in the Foundation library, because it only concerns gestures rather than UI elements or motion (which things tend to go in the Material3 layer).
👍 1