How does android:taskaffinity
attribute work?
As per my understanding, pressing the Home key will move the activity to back stack, but it will not be destroyed. I am confused.
How does android:taskaffinity
attribute work?
As per my understanding, pressing the Home key will move the activity to back stack, but it will not be destroyed. I am confused.
You indeed set a diffrent android:taskAffinity for activity2 and for the other activities. This will force android to make a diffrent stack when (see my example).
<activity android:name=".activity2" android:taskAffinity="com.example.act2" >
</activity>
<activity android:name=".activity1" android:taskAffinity="com.example.act1" >
</activity>
The following sequence should be correct. for the
© 2022 - 2024 — McMap. All rights reserved.