I am developing an Android application. I need to call MainActivity without restarting it, since it has a huge amount of data from the Internet.
Suppose now I am engaged in a third activity and I want to return to MainActivity.
If I use:
Intent i = new Intent(Third.this,Main.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i);
it will load MainActivity, but I do not want to restart it. as from the second action, I call finish()
, and he definitely wants what I need.
source share