09.10.2011 2:41, Studio LFP ?????:
*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.
[snip]
That's where those methods pointed out by TreKing come into play, as an
optimization.
And here is a blog post written by Romain Guy that covers this in more
detail:
http://android-developers.blogspot.com/2009/02/faster-screen-orientation-change.html
Those are optimizations for the common cases.
The manifest attribute is fine, too, as long as 1) one understands that
it's also an optimization 2) the code can handle the general case,
where the activity gets recreated and 3) the layout is the same for all
orientations.
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".
To me, it's wrong to mix up the concepts of "here is how you fix this
problem" and "this is an optimization you can make".
To me it's also wrong to forget about the general case, i.e. other
config changes and the out of memory killer (and maybe more cases I
can't think of right now).
YMMV.
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
[email protected]
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Kostya Vasilyev
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en