views:

2089

answers:

3

This is probably a pretty easy to answer question, but I can't find the solution myself after a couple hours of searching the documentation and Google. I set the orientation of my Android app to landscape in the AndroidManifest.xml file: android:screenOrientation="landscape"

However, when I run the app in the simulator, it appears sideways and in portrait mode. How can I switch the emulator to landscape mode on a mac? It's running the 1.6 SDK.

Thanks!

+10  A: 

Not sure about your question - "sideways" is the same as "landscape".

If you mean how to switch during runtime:

  • Switch to previous layout orientation (for example, portrait, landscape): KEYPAD_7, Ctrl-F11
  • Switch to next layout orientation (for example, portrait, landscape): KEYPAD_9, Ctrl-F12

From http://developer.android.com/intl/fr/guide/developing/tools/emulator.html

fornwall
Tried this, has no effect on the emulator for me (on a Macbook).
sw333t
Not even ctrl+f11 and ctrl+f12?Hm, can you try pressing the "fn" key followed by "7" or "9"?
fornwall
Just tried, didn't change anything.
sw333t
Figured it out. Have to do: ctrl+fn+F11
sw333t
And if that doesn't work try, ctrl+cmd+F11. There is a slight lag while the app resets.
Gary Rowe
On my case windows live 7 cmd = (thw window key) Thanks @Gary Rowe
Fabio Milheiro
A: 

To switch to Landscape mode in android emulator u have 2 ways to accomplish.

1> You can create a relative layout such that when you switch from one mode to other it will change accordingly

2> You can create 2 separate XML file both the views and use it whenever required

Rakesh Gondaliya
A: 

ctrl+fn+F11 - works on Mac to change the landscape to portrait and vice versa. Thanks for the answer

Bhimesh Chinta