My Activities are A, B, C. I have A start B, B start C. I need C to return to A using Back Navigation.
Asked
Active
Viewed 55 times
1 Answers
0
You can set tag android:parentActivityName
in your AndroidManifest.xml to achieve this.
Find Activity C's <activity>
segment in AndroidManifest.xml and put this in there:
android:parentActivityName=".package.app.ActivityA"
Example:
<activity
android:name=".package.app.ActivityC"
android:label="@string/title_activity_c"
android:parentActivityName=".package.app.ActivityA" />

nbokmans
- 5,492
- 4
- 35
- 59
-
This supports up navigation. Whereas I am trying to get back to Activity A using the built-in back button. The link was helpful. I need to clear the back stack. My code goes in public void onBackPressed(). – John Masiello Sep 23 '15 at 11:13