-1

If i have stack histories of activities like A>B>C>D>E than i need to open C activity and clear all top activities. Than when back pressed I need result in this format C>B>A?

This is not duplicate question. In this activity we have multiple activity not only 2.

Jean-François Fabre
  • 137,073
  • 23
  • 153
  • 219

1 Answers1

0

if you don't need an activity to be saved as history (in the stack), then you can put a parameter in the AndroidManifest.xml when you declare the activity like this:

<activity android:name=".ClassName" android:noHistory="true" ... />

just add the android:noHistory="true" to the declaration of the class

Khalid Taha
  • 3,183
  • 5
  • 27
  • 43