Hi Satish,
Thanks for the detailed message.
I have 3 tabs, each one consisting of ListActivity - each list is updated dynamically when some external data from a webserver changes.
So to make this application efficient, I wanted to know if, when a user scrolls from tab-tab, would the the an activity associated with one tab be discarded?
i'm still not sure what happens in depth in the code, but I can tell you from my logs, when you swicth from tab to the next, the previous tabs "Thread" (which was used to update it) - is "discarded" or "paused" - so i've got the app to do what I want it to do..
Here's some of my code
- Code: Select all
public void onStop() {
this.myThread.interrupt();
super.onStop();
}
public void onDestroy() {
this.myThread.interrupt();
super.onDestroy();
}
public void onPause() {
super.onPause();
Log.i("RefreshThread", "RefreshThread Terminated...");
this.myThread.interrupt();
}
public void onResume(){
super.onResume();
}
Maybe someone can enlighten me with the internal workings??
My guess is when you switch tabs, a "pause" method is called somehwere. Any ideas?
Thanks for your help and time
Will