According to the activity lifecycle (
http://code.google.com/android/reference/android/app/Activity.html#ActivityLifecycle
), I think I can assume that onDestroy would only be called on
activities after onResume had been called.

Also, I read some code from Android's OS itself, and I see that
assumption there too (e.g. in CallLog module).

I still think it's a bug.

On Feb 26, 12:16 am, Marco Nelissen <marc...@android.com> wrote:
> On Wed, Feb 25, 2009 at 1:36 PM, marmor <gaz...@gmail.com> wrote:
>
> > Hi,
>
> > I think there's a bug involving using Tabs and Landscape/Portrait
> > switching.
>
> > Using an app with TabHost, tab_1 is shown, onCreate and then onResume
> > are called.
> > When switching to tab_2: onPause(1), onCreate(2), onResume(2) are
> > called.
> > When switching to landscape mode: onPause(2), onDestroy(2), onDestroy
> > (1) are called to close the app, and then onCreate(1), onCreate(2),
> > onPause(2) are called.
>
> > I think this is the bug, android had created tab_1 but should have
> > then called onResume(1), onPause(1).
>
> I don't think there is any guarantee that onCreate() will always be
> followed by onResume(), especially since in this case the activity
> isn't even showing, so why should it be resumed?
--~--~---------~--~----~------------~-------~--~----~
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