Such question: There is an instance of AlertDialog with a View added (for example, EditText ). Is it possible to add code in the handler when adding setPositiveButton that does not close the dialog if the View state is inappropriate (for example, EditText.GetText=="" )?
|
2 answers
mDialog.setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (EditText.GetText()=="") mDialog.setCancelable(false); else mDialog.setCancelable(true); } }); Something like this ...
|
Actually, the Chinese chewed everything for teapots like me: http://overoid.tistory.com/29
|