Quantcast
Channel: Removing an activity from the history stack - Stack Overflow
Viewing all articles
Browse latest Browse all 18

Answer by ricky for Removing an activity from the history stack

$
0
0

Removing a activity from a History is done By setting the flag before the activity You Don't want

A->B->C->D

Suppose A,B,C and D are 4 Activities if you want to clear B and C then set flag

intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);

In the activity A and B

Here is the code bit

Intent intent = new Intent(this,Activity_B.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(intent);

Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>