Hello everyone :pray: If I'm using dialog to cover...
# compose
a
Hello everyone 🙏 If I'm using dialog to cover all screen and I want to make user image to be drawn over this dialog to be something like this , I tried many time to add zindex for this view but still not working for me Image on left is actual design - Image on right is current -
s
Which dialog are you using? If you use one that doesn't draw the background, you can put the user images in the dialog. I know
Popup
does this, I'm can't remember the behavior of
Dialog
on Android, but it might work as well.
a
can you explain more please ?
c
I think z-index only has an effect if you are within the same “screen”. You might try adding a full-screen Box or something instead of a separate Dialog to see if it is working if all elements are in the same Composable scope
a
yup z-index works only if there are at the same parent view but in my scenario I tried your solution but still bottom navigation view is not covered with this effect cuz it's in a different screen 🙏
c
I’m affraid you then need to add the overlay on the same level as the BottomNavigation and fing a way to pass the state change up to that level. Or duplicate the item you want to highlight and add it on your Dialog on the exact position it originally is positioned.
s
I don't think you can use BottomNavigation for this. You need something that can fill the entire screen and draw your icons where you want. https://developer.android.com/reference/kotlin/androidx/compose/ui/window/package-summary
I think
Dialog
works pretty well for this.