When the user taps the back button, an activity(whith has the dialog theme) is started. this activity has two buttons : ok, cancel
How to finish all the activities when the user hits "ok" ?
When the user taps the back button, an activity(whith has the dialog theme) is started. this activity has two buttons : ok, cancel
How to finish all the activities when the user hits "ok" ?
You can create a sub class of Activity(for example SubActivity1
).Now all other Activities that you create in your App must extend SubActivity1
.Then create a static class with a static list of type SubActivity1
and try to add instance of each activity during it's onCreate()
method(when it is created first time) to that list in that static class.Finally when you need to close all Activities,simply call finish()
for all Activities in list.