Hi all,

For my app the landscape orientation is useless, so I set my
activity's "Screen orientation" attribute to "portrait". Even when the
screen orientation changes to landscape, whatever I draw is simply
drawn flipped 90 degrees, which is what I want.

I also don't want my activity to get restarted when the screen
orientation changes, so I set the "Config changes" attribute to
"mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|fontScale"
and handle onConfigurationChanged myself. That's great too.

Now, the thing is, that when onConfigurationChanged gets called, the
orientation is always reported as portrait, while I really want to
know that the user has changed it to landscape, so I can put a message
saying something like "landscape orientation is not supported".

Is there a way to do that? Is there a way in which I can query the
device for it's physical orientation?

On a side note, I read here[1] that I can set the orientation to
"sensor", which will report screen orientation changes as the device's
physical orientation changes. Does this really work on a real device
(I still don't have one) or that's reserved for a future release? I'm
asking because from what I read in some G1 reviews, the device's
screen orientation changes to landscape only when the user slides the
keyboard open.

FWIW I'm using SDK 1.0 r1.

Thanks,
Stoyan

[1] 
http://code.google.com/android/reference/android/R.styleable.html#AndroidManifestActivity_screenOrientation

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

Reply via email to