I have a TabActivity
, and I want to re-create the activity with the tab is visited(calling the content of onCreate()
each visit) . how ?
You could use ....
this.finish(); // this is instance of TabActivity
.... to close the current one and create a new intent using
Intent intent = new Intent(this, TabActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(intent);
Edit:
Intent.FLAG_ACTIVITY_CLEAR_TOP
seems in fact to work as well will probably not work, because though it is intended to bring an existing activity is just brought to front (without recreation).
Check out this for more.
Cheers!