I use the LocalActivityManager to work in different tabs, when I switch from tab to another, I launch an Activity corresponding to the selected tab. My problem is simple:
If I click on the tab 1, I create intent11 , and for the first time a method is called onCreate(Bundle emptyBundle) of Activity1 . If I click on tab 2, I create intent2 and the onCreate() method is onCreate() . Then, when I click on tab1, I create intent12 , the onCreate(Bundle emptyBundle) method is not called, but onResume() is onResume() (normal behavior).
I put special additions in intent11 and intent12 to create Activity1 , so I access it with getIntent().getExtras() .
My problem: the second time I switch to tab1, intent12 used to start the Activity , but the result of getIntent() is still intent11 . Thus, I can not postpone the additional settings set in intent12 , I can only restore the additional settings set in intent11 .
What am I doing wrong? Should I avoid placing additional functions () in intent? Thanks.
Thanks.
PS: at the moment I'm setting a special flag for my intention to force onCreate () to be forced, but I'm sure this is not the best way to do this.
source share