Reputation: 13
In My application there are three activities A, B and C and i have kept two buttons in every activity (Previous and Next button) so that user can move from one activity to another. Suppose User is in activity B and user wants to navigate to Activity A.
Here my problem is.. I need to load the old activity instead of creating new instance of Activity A.
Upvotes: 0
Views: 592
Reputation: 1249
Try to call your intent with the flag "BROUGHT TO FRONT"
Intent i = new Intent(...);
i.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
startActivity(i);
Upvotes: 0
Reputation: 35661
Just call finish
on the current activity and the previous one will be shown automatically.
Upvotes: 1