postDelayed is even worse.

Just understand that if the activity's fragment state has already been
saved, your code will need to correctly update it if it is later restarted
from the state.

On Wed, Sep 14, 2011 at 9:31 PM, Nikolay Elenkov
<nikolay.elen...@gmail.com>wrote:

> I have a simple activity with a list fragment on the left and a details
> fragment on the right. Tapping a list item kicks off a loader which
> gets some data over HTTP and delivers it in onLoadFinished().
> That works fine, but I'd like to change the detail fragment at this
> point. Calling FragmentTransaction.commit() results in an
> IllegalStateException, as explained in the docs [1].
> FragmentTransaction.commitAllowingStateLoss() seems to
> work, but feels wrong. What would be the right/preferred way
> to do this? postDealyed()?
>
>
> 1.
> http://developer.android.com/reference/android/app/LoaderManager.LoaderCallbacks.html#onLoadFinished(android.content.Loader
> <D>,
> D)
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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