Alexander Black

    Alexander Black

    1 year ago
    So this is obviously not done… I’m wondering how I could possibly set new hight measurement of the full screen when drawing the bottom sheet for the first time, so when I move the bars out of the way this bottom sheet will fill the whole view. Any help would be greatly appreciated. 🙂 There’s obviously still some jank in what I’m building.. that will be resolved.
    this feels like a hack, but I got it to work sort of… by doing this:
    val heightDp = LocalContext.current.let {
            val displayMetrics = it.resources.displayMetrics
            displayMetrics.heightPixels / displayMetrics.density
            // so I'm not sure what this offset is about, but currently this seems to work on my pixel 5
            modifier = Modifier.requiredHeight(heightDp.dp).offset(y=-(30).dp),
    ... more SheetScaffold code
    no idea why there’s a 30.dp offset in addition to the screen height, but just empirically this works on a pixel 5. No idea if it will look right on other phones yet.
    actually turns out the offset doesn’t really work, because it pushes up other content that I did not intend to push up… so I’m still looking for a solution