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
Alex Styl
07/22/2024, 10:10 AM
Android doesn't support it yet
Alex Styl
07/22/2024, 10:24 AM
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
T8522192
07/22/2024, 10:31 AM
@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
Alex Styl
07/22/2024, 11:56 AM
@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
T8522192
07/23/2024, 3:35 AM
@Alex Styl that implementation is pretty legit! thanks for all your sharing 😊😊