Reputation: 11722
I want to have an activity which clears top (clearTop=true) whenever there is an intent to start that activity. Right now I have to control the activity start from every place and manually add (xamarin.android syntax) activity flag to intent:
intent.AddFlags(ActivityFlags.ClearTop);
Please advise how to put this behavior into manifest/attribute
Upvotes: 3
Views: 1293
Reputation: 17566
I tested the different launchMode
s, and I found that singleTask
seems to act exactly like singleTop
+ FLAG_ACTIVITY_CLEAR_TOP
.
android:launchMode="singleTask"
Upvotes: 0
Reputation: 623
Put attribute android:launchMode="singleTop" to your activity
more info here
Upvotes: 0