>
> Having used Android for 4 months, and now having a game doing well in
> the market, I am still wondering why a rotation change results in
> Activity creation / destruction in the first place? It has never made
> sense... why not an onLayoutChanged() type of event instead?
>
> It seems wasteful and counterintuitive to create new activities when
> the activity hasn't actually changed...
>
> I'd love to know the reason for it, am sure I am probably missing
> something obvious.

For applications using the widget framework (most non-games), Android will
map in fresh resources, as these may differ based upon screen orientation.
So, for example, you get fresh XML layout files, if you have different
ones for landscape versus portrait.

There are ways to tell Android to not destroy and recreate the activity,
if that is not what you want.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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