Basically,I want to restart the activity ,each time the textview will display a different text that i have stored in a vector.
Asked
Active
Viewed 51 times
0
-
1I don't quite get what you mean... Can you give us more details? – Chris Oct 03 '12 at 18:18
-
http://stackoverflow.com/questions/2486934/programmatically-relaunch-recreate-an-activity – Chris Oct 03 '12 at 18:32
1 Answers
0
You could use this:
public void recreate();
Note: Cause the Activity to be recreated with a new instance. This results in essentially the same flow as when the Activity is created due to a configuration change -- the current instance will go through its lifecycle to onDestroy() and a new instance then created after it.

Daniel Conde Marin
- 7,588
- 4
- 35
- 44
-
This should be fine for what you want by calling this.recreate() for example, mark the answer as correct if did help you :) – Daniel Conde Marin Oct 03 '12 at 18:26