Friday, June 4, 2010

[android-developers] Why is making orientation configChanges manually frowned upon?

I posted this same question on stackoverflow, but didn't really get an answer:

http://stackoverflow.com/questions/2967903/handling-orientation-changes-yourself

When it comes to threading and handling orientation changes, it can
become quite tedious because the Activity gets destroyed. You have to
create some way to store the thread (and any other data you want to
preserve) so that you can point it at the new Activity.

When handling the orientation changes yourself, to me, it seems a lot
easier, and less tedious. You just call setContentView in your
onConfigurationChanged method, which you have to do anyway when you
create the Activity.

However, the documentation states that you should only do that sort of
thing as a last resort. What is considered a last resort? Would this
be an acceptable use-case? I feel like I'm missing something
important here.

--
Adam Olsen
SendOutCards.com
http://www.vimtips.org
http://last.fm/user/synic

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment