[android-developers] Re: How to force screen to switch between landscape/portrait

2009-02-01 Thread Christian Wiesbauer

You can use
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE |
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); from the Activity class.

-Ursprüngliche Nachricht-
Von: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] Im Auftrag von Tomei Ningen
Gesendet: Montag, 02. Februar 2009 03:18
An: android-developers@googlegroups.com
Betreff: [android-developers] How to force screen to switch between
landscape/portrait


Is there a way to programmatically force the screen to change between
landscape and portrait mode? I want to allow the user to choose a menu item
to rotate the screen, instead of relying on pulling out the keyboard.

I am looking for something like Activity.changeScreenOrientation, but
couldn't find such a thing in the API docs ...

Thanks


  



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



[android-developers] Re: How to force screen to switch between landscape/portrait

2009-02-01 Thread Tomei Ningen

Oh, pardon me. on second reading of the doc:

Activity.setRequestedOrientation()

will do the trick

sorry for the spam



- Original Message 
From: Tomei Ningen 
To: android-developers@googlegroups.com
Sent: Sunday, February 1, 2009 6:18:25 PM
Subject: [android-developers] How to force screen to switch between 
landscape/portrait


Is there a way to programmatically force the screen to change between landscape 
and portrait mode? I want to allow the user to choose a menu item to rotate the 
screen, instead of relying on pulling out the keyboard.

I am looking for something like Activity.changeScreenOrientation, but couldn't 
find such a thing in the API docs ...

Thanks


  

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