Skip to content

Minimum height after collapsing #55

@sceneren

Description

@sceneren
CollapsingTopBarScaffold(
        state = topBarScaffoldState,
        scrollMode = CollapsingTopBarScaffoldScrollMode.collapse(expandAlways = false),
        topBar = { topBarState ->
            CollapsingTopBarColumn(
                state = topBarState,
                collapseDirection = CollapsingTopBarColumnDirection.TopToBottom
            ) {
                NetImage(
                    modifier = Modifier
                        .clipToCollapse()
                        .fillMaxWidth()
                        .aspectRatio(1080f / 700f),
                    model = "https://picsum.photos/1080/700?random=1"
                )
                
                PrimaryScrollableTabRow(
                    modifier = Modifier
                        .notCollapsible(),
                    containerColor = LocalColors.current.background,
                    selectedTabIndex = selectedIndex,
                    edgePadding = 10.dp,
                    minTabWidth = 30.dp,
                    divider = {},
                    indicator = {}
                ) { ... }
                }
            }

        }
    ) {...}

My topbar consists of an image and a PrimaryScrollableTabRow. The image needs to overlap with the status bar, but when the image is collapsed, the PrimaryScrollableTabRow needs to be displayed below the status bar. I don't know how to do this. I think this library could add an API to set a specific height at which it stops collapsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions