For a custom AlertDialog, can I override the positive button to NOT close the dialog? instead I want to run some edit checks and keep the dialog open if my checks fail.
Ok, here is just an idea of how it is possible to implement.
AlertDialog.Builder
has setView(View v)
method. So it is possible to add, say, a custom LinearLayout
(inflated from resources right before Dialog building) with button(s). Then just set usual android.view.View.OnClickListener(s)
on the button(s). In this case don't use those "built-in/native" for the AlertDialog.Builder
buttons at all.