Hello, is the AlertDialog usable in Compose Wear? ...
# compose-wear
a
Hello, is the AlertDialog usable in Compose Wear? If not, what would be an alternative component to use for similar interactions?
For example, a screen that can take up the whole space, show some description text, a confirm button, dismiss button, and even better, can be swipe to dismissed
a
These are in-progress, and will be in the wear compose-material library here: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:wear/com[…]rc/commonMain/kotlin/androidx/wear/compose/material/Dialog.kt They haven’t been released as part of an alpha yet, but if you’re feeling adventurous, you can try them out with a snapshot build which uses the latest tip-of-tree code: https://androidx.dev/
👍🏻 1
a
thanks for the reference!
👍 1
j
you can get access to the latest snapshot release or they will be available next week in the alpha12 release
s
There are two styles of dialog in this release - AlertDialog which is along the lines that Andrew described above, supports icon/title/message and either positive/negative Buttons or a stack of Chips. AlertDialog is also swipe dismissable. ConfirmationDialog is for simple acknowledgements - shows icon + title and self-dismisses after a timeout.
👍 1