Saturday, October 8, 2011

Re: [android-developers] Re: textView Clears on Rotation

TreKing, Kostya, Romain Guy,

I do understand what you guys are saying, so I am listening, but it seems to be a contradiction since it seems most of the internal applications use it, including quite a few that Google themselves send with the devices. Maybe they aren't, but based on the speed of the rotate and the way the screen looks, I'm pretty sure they are.

There are other issue like when using OpenGL and putting a game in landscape only mode. If the device is in portrait when it is launched, you are going to get a instance of your application in portrait just to be destroyed at an arbitrary time after launch to be remade into a landscape. Is there a good way to know this is coming so you don't do a lot of expensive instructions just to have to do them again?

Also, what about times where a particular activity may take a bit of time to setup properly and the users tilts the device slight, but doesn't mean to rotate it, and it rotates. They immediately rotate it back causing yet another reload for a simple whoops. Not to mention clearing the location of ListView scrolls and the likes which causes the user to have to find specific items again. I catch myself doing that all the time.

Not only that, but with a lot of devices having slide out game pads and keyboards. This becomes a lifesaver to not have to deal with a stream of destroy/remake when the hardware is being pulled out and put back. I've watched people look at a text, spin the device, drop the keyboard out, type a reply and do the first two steps in reverse. That would equal three destroy/remakes on pulling the keyboard out and two destroy/remakes on putting the keyboard back in ( I dealt with this with myself and people I know with the Droid/2/3).

It seems like there are so many times where this is useful and being used, yet people seem to be trying to tell people that it is "wrong", "incorrect", "you are a horrible person and coder for using this".

Steven
Studio LFP
http://www.studio-lfp.com


On Saturday, October 8, 2011 4:34:14 PM UTC-5, Romain Guy (Google) wrote:
TreKing,

If you choose to ignore a well documented feature given to us by the Android team, that's your prerogative. As for the rest of us, we'll decide when we prefer to use one feature over another.

He makes a good point. "Solving" this issue by requesting to handle orientation changes yourself just masks the problem (unless you request to handle *all* configuration changes in which case you make more work for yourself.) Handling orientation changes yourself also has a lot of side effects (if you want to have a different layout in landscape and portrait you now need to deal with it manually.)

--
Romain Guy
Android framework engineer
roma...@android.com

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