How can I add an element to a list using a button from a dialog box
I created an activity which has a button, when clicked, shows a dialog box. This dialog box has two buttons, “Confirm” and “Cancel”. When I press cancel, I want to add data to a list and show the list: