Bug P4
Status Update
Comments
da...@gmail.com <da...@gmail.com> #2
Any update?
an...@google.com <an...@google.com>
al...@gmail.com <al...@gmail.com> #3
Hi! I have some problem with dim in Popup Compose function
But I hack that:
var showMenu by remember { mutableStateOf(true) }
val onDismissMenu = { showMenu = false }
if (showMenu) {
Dialog(
onDismissRequest = onDismissMenu,
properties = DialogProperties(usePlatformDefaultWidth = false)
) {
Box(
modifier = Modifier
.fillMaxSize()
.clickable {
onDismissMenu.invoke()
}
) {
// by offset in Modifier u can place content by X and Y
Content()
}
}
}
But I hack that:
var showMenu by remember { mutableStateOf(true) }
val onDismissMenu = { showMenu = false }
if (showMenu) {
Dialog(
onDismissRequest = onDismissMenu,
properties = DialogProperties(usePlatformDefaultWidth = false)
) {
Box(
modifier = Modifier
.fillMaxSize()
.clickable {
onDismissMenu.invoke()
}
) {
// by offset in Modifier u can place content by X and Y
Content()
}
}
}
Description
Jetpack Compose version: 1.1.1 Jetpack Compose component used: Popup Android Studio Build: 2021.1.1 Kotlin version: 1.6.10
The Popuphas no ability to dim the background like the Dialog does it. I can't use the Dialog because it shoulnd't be centered on the screen. I want to build a functionality like the Popup in Google Photos has it (when clicking the Profile). The Popup should start at the top with a dimmed background.
I can't find any solution in the Documentation or Google. Maybe here a solution could be provided.