I'm using `androidx.compose.ui.window.DialogProper...
# compose
t
I'm using
androidx.compose.ui.window.DialogProperties
for multi targets. For js browser it is working fine, but for android, I get compile error
No parameter with name 'scrimColor' found.
Seems like a bug to me, or I miss some configs? Any idea..? 🥺
a
Android doesn't support it yet
Overall dialogs on Android seem to behave differently than the rest of Compose Multiplatform. I think it's because Android is using native dialogs and they have been historically difficult to customize. I needed a consistent way to style dialogs on CMP so I built this, which supports custom scrim colors on Android too.
👍 1
t
@Alex Styl thnak for the quick reply! I will check the link for source code later, it looks like a workable solution at first glance 😊
💯 1
a
@T8522192 to save u some time: the way i do it is by creating a native dialog on Android which is fully transparent and full screen then you can optionally use a
Scrim()
composable which sits on top of that native dialog, which dims the background then on top of that you use the
DialogPanel
composable for your dialog's content, where i place it on the center of the screen makes working with dialogs more predictable this way. For technical stuff look at the
NoScrimDialog
on the android sourceset
🙌 1
t
@Alex Styl that implementation is pretty legit! thanks for all your sharing 😊😊
👌 1