Ololoking Ololoking - 5 months ago 54
Android Question

Material dialog library- onPositive Button clicked dismiss

I am using this Material Dialog library, and when I click

onPositive
Button dialog close, how to dismiss this closing of dialog?
Thanks for answers.

Answer

add: autoDismiss(false)

  new MaterialDialog.Builder(mainActivity)
            .title(R.string.title)
            .autoDismiss(false)
            .content(R.string.content)
            .positiveText(R.string.positive)
            .negativeText(R.string.negative)
            .positiveColor(setColor())
            .callback(new MaterialDialog.ButtonCallback() {
                @Override
                public void onPositive(MaterialDialog dialog) {

                }
            })
            .negativeColor(setColor())
            .typeface(titleAndActions, contentAndListItems)
            .build()
            .show();
Comments