Reputation: 3
I am developing an android app in which alert box is called on click of a button. I want that when alert box is displayed it should not disappear without answering to it. Not even by pressing BACK KEY . Only when button on alert box is pressed it should act only then otherwise not. Thank you please reply soon Urgent.
Upvotes: 0
Views: 82
Reputation: 1179
Hi write your code inside this method
public AlertDialog.Builder setOnCancelListener (DialogInterface.OnCancelListener onCancelListener)
or
setCancelable(boolean)
Upvotes: -1