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:
Copy code
val heightDp = LocalContext.current.let {
val displayMetrics = it.resources.displayMetrics
displayMetrics.heightPixels / displayMetrics.density
}
Copy code
BottomSheetScaffold(
// 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
Alexander Black
08/13/2021, 10:47 PM
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.
Alexander Black
08/13/2021, 10:56 PM
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