Hi all

I have an application similar to the HoneycombGallery, but my list are
loaded from the web using a AsyncTask.

In the HoneycombGallery sample, the TitlesFragment calls the
populateTitles(category) method all the time, even after a orientation
change.

I my project I would like to use the onSaveInstanceState(bundle)
method to save the list of objects.

But I have some concerns about how to control de lyfecicle of the
ActionBar with Tabs.

Because it seems that every time you add a Tab, it executes the
onTabSelected right now. You can see this behaviour in
HoneycombGallery  sample as well. In my case, it´s worst, because it
´ll will start a new http request.

I also tested the ActionBar + Tabs lyfecicle and it seems the Fragment
Transactions are saved during the orientation changes, so if I don´t
add the ActionBar.addTabs at the second time (after the orientation
change) the fragment state can survive. Yes, I´m also implementing the
onSaveInstanceState stuff on my fragments.

The problem is that every time you call ActionBar.addTab it will
execute a new fragmentTransaction to replace the Tab, and the fragment
state will be lost.

So how is the correct way to handle the lyfe cicle of this kind of
applicatino with ActionBar+Tabs?

thank you
Ricardo

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

Reply via email to