android - How to open a previous instance of an Activity and recreate it? -
Basically, I need that when I call startActivity () once the
activity < / Code> Forward the front example and do not destroy other activities.
For example, if I have activity in the stack
A-> B-> C-> D
and I want to open from D, which is currently the flag I use FLAG_ACTIVITY_REORDER_TO_FRONT which leaves the activity stack in this situation: A-> C-> D-> B . This order is correct in the activity stack, however, with that flag activity is not created and onNewIntent () is called
because < The complexity of code> activity is that I do not want to reflection many things, what I want to do is to recreate B from scratch ( onCreate () to its argument onNewIntent () Instead of executing it in the method). The activity stack should have the same condition as I use the FLAG_ACTIVITY_REORDER_TO_FRONT . Any remedy? Your help will be greatly appreciated. :)
If all your work is in onCreate () and you If you want to work within the same thing for onNewIntent () , then you can possibly take part with a simple redefinition. Where all your code is in the setupActivity () call.
Public Empty Creatives (Bundle Saved InstanceStat F) {super.onCreate (savedInstanceStateF); SetupActivity (); } New identity on public zero (intentF) {super.onNewIntent (intentF); SetupActivity (); }
Comments
Post a Comment