Is there some way to do validation upon clicking ok. Im not dismissing it but it closes when I click Ok. I have written a custom AlertDialog that uses some edit texts. Problem is I can't validate anything. If validation fails I want to change message and tell user but instead it just closes. I'm using AlertBuilder
builder.setPositiveButton(DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
// I don't dismiss here.
}
}