0

After this code in MainActivity:

Intent intent = new Intent(this, OtherActivity.class);
startActivity(intent);

then when a button is clicked in OtherActivity NavUtils.navigateUpFromSameTask(this); happens, so the app returns to MainActivity. But I don't think the data is restored from previously, and I don't think it should've been destroyed because onDestroy() wasn't called right?

1 Answers1

0

The answer is here: Returning from an activity using navigateUpFromSameTask()

android:launchMode="singleTop" in the manifest prevents a new instance of the activity from being created.