Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resume an activity when calling it from an Intent

I have the following situation: one activity (DateActivity) calls another activity (ListActivity) when a button is clicked. That is working. However, every time the button is clicked it seems that a new copy of ListActivity is created. How do I make it resume the last ListActivity or create a new one if needed?

Note: I'm currently starting the ListActivity using startActivity(intent);

like image 655
paulot Avatar asked May 13 '12 00:05

paulot


1 Answers

not quite sure about your situation, but you can use intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent); to achieve your goal.

like image 89
Longerian Avatar answered Oct 19 '22 23:10

Longerian