You need to add the parent stack for the triggering action, not its parent.
Replace:
stackBuilder.addParentStack(MainActivity.class);
from:
stackBuilder.addParentStack( MatchActivity.class );
It is assumed that you have defined the parent in the manifest (API 16 +):
<activity android:name=".MatchActivity" android:parentActivityName=".MainActivity" ... />
If you are developing for API 16, then you need to define the parent as:
<activity android:name=".MatchActivity"> <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> </activity>
Ralgha Nov 29 '12 at 18:45 2012-11-29 18:45
source share