android - Alert box ..on and off -
Hi, I am using vigilant..and when the user clicks, then he has to restart the same functionality (game) and when those clicks do not go to the main menu .. But when I click OK . The activities of 2 are running together and when I do not watch .. and come back here .. the dialogue still exists! help! This snippet is
AlertDialog Builder warning box = new alertDialog. Builder (this); Alertbox.setMessage ("Oh! Wrong answer! Play again!"); Alertbox.setPositiveButton ("Yes Sure!", New DialogInterface.OnClickListener () {Intent Game = New Intent ("nik.trivia.GAME"); Startup (game); End ();}); Alertbox.setNegativeButton ("No, move me to the main menu", New Dialog interface. OnClicklist () {click on Public Zero (DialogInterface arg0, int arg1) {intent menu = new intent ("nik.trivia.MENU") ; StartActivity menu); End ();}});
You should reject your alterdialog After the user has clicked a button. Edit: Just keep this line's code:
arg0.dismiss (); onClick inside the method
Comments
Post a Comment