Ololoking Ololoking - 3 years ago 237
Android Question

Material dialog library - prevent dismissing/closing the dialog on onPositive function call

I am using this Material Dialog library and when I click the positive button, the

function is called and the dialog is closed. How can I prevent the dialog from closing/dismissing?

Thanks for answers.

Answer Source

add: autoDismiss(false)

  new MaterialDialog.Builder(mainActivity)
            .callback(new MaterialDialog.ButtonCallback() {
                public void onPositive(MaterialDialog dialog) {

            .typeface(titleAndActions, contentAndListItems)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download