Colton Idle
05/11/2021, 2:41 PMDialog
and try to morph it into alertDialog design, or is there a way to pass a composable into an AlertDialog that I'm missing?Louis Pullen-Freilich [G]
05/11/2021, 2:53 PMDialog
- the implementation is trivial. It’s really just a Dialog
with a Surface
with a shape with rounded corners 🙂Colton Idle
05/11/2021, 3:04 PMval dialogWidth = 200.dp
val dialogHeight = 50.dp
as I'm used to AlertDialogs in view-land basically always setting it's own size as it promotes consistency throughout the platform.Louis Pullen-Freilich [G]
05/11/2021, 3:07 PMDialog
- you don’t have to set the size 🙂 It should just default to the framework’s default size for consistency.
And yeah, you can just make the root a Surface
, take a look at: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]mmonMain/kotlin/androidx/compose/material/AlertDialog.kt;l=44
This is just placed inside a Dialog
Colton Idle
05/11/2021, 3:56 PM