Issue
After I do some change in my database, that involves significant change in my views, I would like to redraw, re-execute onCreate.
How is that possible?
Solution
UPDATE: Android SDK 11 added a recreate()
method to activities.
I've done that by simply reusing the intent that started the activity. Define an intent starterIntent
in your class and assign it in onCreate()
using starterIntent = getIntent();
. Then when you want to restart the activity, call finish(); startActivity(starterIntent);
It isn't a very elegant solution, but it's a simple way to restart your activity and force it to reload everything.
Answered By - Steve Haley
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.