Colton Idle

    Colton Idle

    2 years ago
    I haven't tried using compose for this, but early today I was tasked with implementing a Modal (dialog, alertDialog, fragmentDialog?) in regular android UI toolkit land and it just got me thinking... I really hate writing modals/dialogs currently in Android. The width of the modal is always an issue I have to work around, there's like 3+ dialogs to use/inherit from and I always forget what's the right one, and there's weird gotchas where you have to remember to override one method, but not another method. Maybe it's just me? What is compose doing to make modals easy in Android?
    Ian Arbuckle

    Ian Arbuckle

    2 years ago
    Since Compose follows material design you should consider using bottom sheet dialogs for supplementary information. https://material.io/components/sheets-bottom#usage
    Colton Idle

    Colton Idle

    2 years ago
    Not to change the subject, but bottom sheets have an equally terrible API in my opinion. My team has had so many issues trying to get bottom sheets to work properly. In this case though, my designer definitely does not want a bottom sheet. They want a modal.
    Ian Arbuckle

    Ian Arbuckle

    2 years ago
    I haven't seen any popup modal dialogs in Compose yet. There is
    ModalDrawerLayout
    and
    BottomDrawerLayout
    Actually there is
    AlertDialog
    you can try 🙂