How to prevent a dialog from closing when a button is clicked

后端 未结 18 1866
无人及你
无人及你 2020-11-21 23:59

I have a dialog with EditText for input. When I click the \"yes\" button on dialog, it will validate the input and then close the dialog. However, if the input

18条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 00:32

    If you are using material design I would suggest checking out material-dialogs. It fixed several issues for me related to currently open Android bugs (see 78088), but most importantly for this ticket it has an autoDismiss flag that can be set when using the Builder.

提交回复
热议问题