hi there.

I'm a newbie using android sdk.
In my first application, I have a TabWidget which is defined into the
xml. It can contains several tabs, created programmatically. The
number of tabs depends of the data coming from a web service.

I want to reload the data each time the application is displayed. To
do that, I reimplemented the onResume on the activity. A background
task is launched to preform the refresh of the data then, to recreate
the tabs (into a runOnUiThread method).

The problem here is I don't know if I have to recreate the tabs OR to
refresh only the data of the views inside the tabs.

For now, I recreate the tabs but I often got some exceptions and I'm
pretty sure it is the wrong way to do that.
For example, I leave the application with the second tab open, when I
come back, the reload is perform and I got an exception. This
exception is not there if I were on the first tab. I can try to
"clean" the tabs or "remove" the views but I guess is weird to do
that.

So what is the best way to implement tabs and data refresh ?

Thanks a lot!
David
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to