I would like to know if it’s possible to keep only 1 of each activity in history? I have tab-like interface and when user goes between activities it remembers them in history.
I tried noHistory attribute but it will cause activities to not go into history at all.
Ideally I’d like to have history but make it work like this:
Scenario:
Act1->Act2->Act1->Act2
In “standard” setup when clicking “back” it will unwind like
Act1->Act2->Act1->GONE
In “noHistory” mode it when click “back” it will be:
GONE
I want only 1 copy of each in stack, so it will be:
Act1->GONE
Possible?
When you call
startActivity(), addFLAG_ACTIVITY_REORDER_TO_FRONTto theIntent. That will reuse your existing activity instance.