I had an app that i want it exit a specific activity for example: A -> B -> C but everytime i press the back button from activity C it always bring me back to B and from B to A before exiting. Is there anyway that I can exit directly from C no need to go through B and A again?
Asked
Active
Viewed 113 times
2 Answers
1
If you know A and B are complete, call finish() within each of them after they've started the next activity.
mah
- 38,251
- 9
- 74
- 91
0
If you don't want an Activity to show up in the history, you can define it in the manifest file with the noHistory attribute. I've done this for a few of my activities.
<activity android:name="com.sample.activity.MyActivity" android:noHistory="true" />
brianestey
- 7,862
- 5
- 32
- 47