[android-developers] Re: How can we restart an Activity properly?

2009-01-07 Thread Senthil kumar A

Hi Toothy Bunny,
  Please try this code in your restart. i think works fine

Intent  intent = this.getIntent();
startActivity(intent);
finish();


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can we restart an Activity properly?

2009-01-02 Thread Toothy Bunny

Just want to add one more thing:
I printed out the instance count by this.getInstanceCount(), the
result is that the instance count is increased once the restart() is
called, like 1, 2, 3, ..., which means the old instance is not killed.
We need to kill the old instance in the newly restarted Activity.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---