https://kotlinlang.org logo
#compose
Title
# compose
f

Filip Wiesner

12/13/2021, 12:02 PM
When using Popup, the content is clipped by system UI even though the activity draws behind it. Am I missing something? Code in 🧵
Popup code:
Copy code
fun PopupDialog(
    visible: Boolean,
    onDismissRequest: () -> Unit
) {
    val properties = remember {
        PopupProperties(dismissOnClickOutside = false)
    }
    if (visible) {
        Popup(
            alignment = Alignment.BottomCenter,
            onDismissRequest = onDismissRequest,
            properties = properties,
        ) {
            Box(
                modifier = Modifier
                    .fillMaxSize()
                    .background(Color.Red)
            )
        }
    }
}
And as a bonus, there is 1px wide gap on the rigt side for some reason 🤷‍♂️ (now I am seeing one pixel on both sides)
🏁 I am trying to make a full-screen view that draws over the rest of the app. The goal is to have a bottomsheet-like component, that can return a result and can draw over bottom navigation menu.
s

Sanendak

12/13/2021, 6:38 PM
f

Filip Wiesner

12/13/2021, 7:47 PM
Yes, I know about this library and use it heavily. Yes, it can be used to calculate system bar UI height and make the Popup bigger manually (using
requiredHeight
and
offset
) but it feels like a hack rather than proper solution.
Fixed in this thread 🎉
👍 1
🤗 1
5 Views