Skip to content

Conversation

@phcannesson
Copy link

This PR aims to fix the issue mentioned in issue #100, which I'm also facing in my app.

The logic is to update height when maxHeight changes while the toolbar is fully expanded.

@Veeksi
Copy link

Veeksi commented Mar 1, 2024

Looks like this PR fixes my issue as well because my toolbar uses dynamic height when calculating statusBarHeight. I hope this gets merged asap!

#103

@johan-padilla
Copy link

@onebone any news to accept this change?

@masterdev01
Copy link

    @Composable
    fun rememberStatusBarHeightDp(): Dp {
        val view = LocalView.current
        val density = LocalDensity.current

        val statusBarHeightPx = remember {
            ViewCompat.getRootWindowInsets(view)
                ?.getInsets(WindowInsetsCompat.Type.statusBars())
                ?.top ?: 0
        }

        return with(density) { statusBarHeightPx.toDp() }
    }

Use this code for top padding

@khygu0919
Copy link

is there any update? i'm using toolbar which height is changed with network image element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants