I have an activity called "A" that displays a list of items. The "Refresh" button displays a user dialogue (activity is displayed on the back) with a list of selected items. When the "Order" button is clicked inside the user dialog.
- The user dialog disappears.
- execution dialog is displayed (as the work of the order continues)
- after the job is completed, the run dialog is executed.
- Show the alert dialog box that says โOrder Confirmedโ
- When I click the positive button in the warning dialog box, I want to close the activity that is in the back (i.e. operation A). To go to the main screen
- How can I call the completion code inside the alertdialog positive Onclicklistener () button
Please help me solve this problem.
noData.setPositiveButton("Ok", new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } });
How to add finish () after canceling alertDialog ()
source share