I am making an application and it has an Alert Dialog in it.
Now i am checking some data I got from AlertDialog editTexts in dialog Positive button OnClick method but the dialog always dismiss if data i got from edittext fields is correct or not.
How can we disable this feature.
UPDATED:
I am gettin Pin Code and Confirm Pin Code from the Dialog Box and in onPositive click i have checked to verify the pin codes.
Now if the pin codes matches then it is calling dialog.dismiss() and if not matching then display a Toast.
But in case of pin code not matched it displays me the message and dismiss the dialog.
I dont want that to be happen.
MORE UPDATES:
is there any way that i will disable the OK Button and when data is verified it will enable the positive Button??
Please help
This is the trick (override onClickListener inside onShowListener):
Cap. Thanks for your help. through your guides i have got to know that i can disable the Alert Dialog Button. YES! its possible to disable the buttons.
Answer is:
we can disable the button using:
if you want dismiss dialog whenever you want then you must need to use Custom Dialog instead of Alert Dialog.
AlertDialog always dismiss when you press Negative or Positive button of AlertDialog.
For more information about custom dialog then Click here Custom Dialog