AlertDialog.modal documentation unclear
The documentation for AlertDialog.modal says:
modal
Whether dialog can be dismissed/closed by clicking the area outside of it.
Value is of type bool and defaults to False.
So I assumed that setting it to True would allow the AlertDialog to be dismissed/closed by clicking the area outside of it, however, the opposite appears to be the case.
No big deal, but it took me longer than I care to admit to figure out what was happening 😂
When u set the modal method to True, you can only dismiss the dialog on an event which is sometimes not the case on Android where the back button can also dismiss the dialog even if modal attribute was set to True.
When modal is set to False, that literally means by a mere clicking on the barrier background, the dialog is dismissed without even an event.
When u set the modal method to True, you can only dismiss the dialog on an event which is sometimes not the case on Android where the back button can also dismiss the dialog even if modal attribute was set to True.
When modal is set to False, that literally means by a mere clicking on the barrier background, the dialog is dismissed without even an event.
Yep, understood. I suggest the docs could make this more clear.