https://kotlinlang.org logo
#compose
Title
# compose
r

Rihards

02/08/2023, 3:54 PM
Is it possible to swap button positions for Alert dialog? At the moment
dismissButton
is displayed as first, but I want to display
successButton
first.
1
And I know that I can simply swap them in code (so that success button is passed to dismiss and vice versa), but for code reading perspective - wouldn’t look good. Would prefer to swap them differently if possible.
f

Filip Wiesner

02/08/2023, 6:45 PM
Not just code reading but from user (UX) perspective this won't be good because people expect some behavior from UI elements. This is dictated by Material design guidelines so the UI library follows this rule.
r

Rihards

02/08/2023, 6:48 PM
So dismiss option always should be on left if buttons displayed in one line and on top if they are placed on separate lines? 🤔
r

Rihards

02/08/2023, 7:14 PM
Thank You!
5 Views