[android-developers] Best way to do a refresh?
I am writing a single-activity Android app that accesses data from various places on the internet and displays it on the screen. This data can change over time. I need to give the user the option to do a manual refresh when he chooses, in order to get the latest values.
I have it set up as an option on the options menu when the user clicks the Menu button on the handset. But I think my implementation is faulty.
Right now I have it set up as an intent to launch the activity again, so that it will automatically retrieve the latest values. The problem is that does not terminate the previous activity. So when the user pushes the escape button, they are back on the previous execution of the activity, which is the same app with the old data.
Is there some way to terminate the old activity and then launch it again? Or is there a better way to do a refresh?
Thanks.
-- 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home