Do we have an example somewhere of a app with a pa...
# compose-wear
b
Do we have an example somewhere of a app with a pager whose pages are lists? And so the timeText should probably disappear when scrolling on the lists, but re-appear when switching pages? (And same for the horizontal page indicator, I suppose).
y
I think Horologist has one. I can dig one out later. AppScaffold, ScreenScaffold and PagerScaffold are designed for this case.
b
Ah that's great news!
y
Nope, not exactly. But something like
Copy code
@Composable
fun SamplePagerScreen(swipeToDismissBoxState: SwipeToDismissBoxState) {
    PagerScreen(
        modifier = Modifier.edgeSwipeToDismiss(swipeToDismissBoxState),
        state = rememberPagerState {
            10
        },
    ) {
        PagerItemScreen(item = it)
    }
}

@Composable
internal fun PagerItemScreen(
    item: Int,
) {
    val columnState = rememberResponsiveColumnState(
        contentPadding = ScalingLazyColumnDefaults.padding(
            first = ScalingLazyColumnDefaults.ItemType.Text,
            last = ScalingLazyColumnDefaults.ItemType.Chip
        )
    )
    ScreenScaffold(scrollState = columnState) {
        ScalingLazyColumn(columnState = columnState) {
            item {
                ResponsiveListHeader(
                    contentPadding = firstItemPadding(),
                ) {
                    Text(text = "Page $item")
                }
            }
            items(10) {
                Chip(label = "Chip $it", onClick = { /*TODO*/ })
            }
        }
    }
}
👀 1
This example assumes it's inside AppScaffold and SwipeDismissableNavHost.
b
Thanks a lot! I'll have a look at it today
YES it works 👍 Not sure if the page indicators should also move away though? (yes it's a conf app but not Confetti 😂)
y
I'll check about that on Tuesday.
🙏 1