As is typical, noticed the r2 release of the compatibility library
right after I posted this!

That has fixed the duplication issue, however I'm still wondering why
each fragment instance inflated from setContentView gets calls to
onStart(), onStop(), then onStart() again? Shouldn't there be only a
single call to onStart()?

-dave

On May 22, 5:43 pm, Dave Johnston <john...@gmail.com> wrote:
> I'm encountering a peculiar issue with the user of FragmentActivity.
>
> In my test app, my FragmentActivity's onCreate method calls
> setContentView, which inflates a simple layout consisting of a single
> Fragment.
>
> However, I'm finding that when the device is rotated, this process
> causes additional Fragments to be created, such that after one
> rotation there are two Fragment instances, and after two rotations
> there are three Fragment instances being created.
>
> I'm also unclear why, when this Activity is first launched, the
> Fragment instance created via setContentView() appears to be started,
> stopped, and then started again.

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