insomniac
insomniac

Reputation: 11766

Android emulator not rotating to landscape

When i try to switch the orientation of my emulator, the emulator window rotates and the orientation of the emulator screen stays as it were. Can anyone tell me what is the reason for this?I have tried all the answers from StackOverflow and nothing seem to help This is how the emulator screen looks like when i try to change the orientation

Upvotes: 36

Views: 27323

Answers (11)

elliptic1
elliptic1

Reputation: 1752

My solution was to enable the accelerometer in the device profile.

Upvotes: 1

pyrocrasty
pyrocrasty

Reputation: 787

Other answers cover this pretty well, but there seem to be some restrictions on using the Ctrl key bindings (at least in Linux).

Summary: Key bindings for changing emulator orientation

Note that there are relevant bugs for emulator targets v2.3 and v4.4. See the bug reports for more info and workarounds.

Emulator shortcuts are listed here.

  • Prev Layout: KEYPAD_7 or Ctrl-F11
  • Next Layout: KEYPAD_9 or Ctrl-F12

Notes on Ctrl key bindings (in Linux)

  • Although the docs claim Ctrl-F11/12 work, I've found that these bindings only work using the left control key (LeftCtrl-F11/12). Someone mentioned this happening in Windows, so it's not just Linux.
  • LeftCtrl-F11/12 using a key remapped to LeftCtrl doesn't work for me. I need to use the physical LeftCtrl key. I don't know whether this affects non-X11 systems as well.

Note on KP_n key bindings

  • Keep in mind that a few numeric keypads actually emit scancodes for the number-row digits, rather than the proper keypad digits. Such keypads won't work for any keypad-specific bindings.

Upvotes: 0

Amritha
Amritha

Reputation: 778

Some of the emulator targets like 4.4 (API level 19) and 2.3 have a bug. Change your emulator to target version 4.2 or 4.3 and try to change the orientation.

See the history of this bug: https://code.google.com/p/android/issues/detail?id=13189

Related question: Impossible to rotate the emulator with android 4.4

Upvotes: 47

Evan
Evan

Reputation: 21

With the android L emulator you can go into landscape by opening your app, then opening the camera app (you will need to set an emulated camera in AVD) record a video. Then press ctr-f12 of 11. In the camera app click the video thumbnail and play it back. The video should go to landscape. Then press the multitasking button and multitask into your app. DO NOT GO TO THE HOME SCREEN OR YOU WILL HAVE TO GO INTO THE CAMERA APP, GO TO LANDSCAPE AND REPLAY THE VIDEO! please let me know if this works for any other android emulator versions.

Upvotes: 2

trakos
trakos

Reputation: 841

If everything else fails (it did for me), as a workaround you can use application for screen orientation. In the other question (Impossible to rotate the emulator with android 4.4), user vldmrrr wrote that:

Until it is fixed I use this free application "Set Orientation". Install the apk into emulator using adb install.

The application displays a shortcut in the notification status bar. (I know it's an old question, but it's pretty high in google).

Upvotes: 10

Milan Delvadia
Milan Delvadia

Reputation: 90

try pressing numpad 7 ... it will rotate your emulator screen.

Upvotes: -8

Srikant Sahay
Srikant Sahay

Reputation: 985

This is a bug in android emulator. Add Keyboard Support - yes in emulator properties to fix this problem. You can track this bug : http://code.google.com/p/android/issues/detail?id=34237

Upvotes: 0

Vedang Jadhav
Vedang Jadhav

Reputation: 510

Is only your application is not rotating or other applications in the emulator also not rotating?

If only your application is not rotating, then there must be android:screenOrientation parameter set somewhere in the manifest file.

If all other apps on the emulator are also not rotating, no problem with your application, delete and create a new emulator..

Upvotes: -2

cavallo
cavallo

Reputation: 4414

These answers help me to do this.. Please try these and you can see what u wanted to do

https://stackoverflow.com/a/4057309/1063861

https://stackoverflow.com/a/4535315/1063861

Upvotes: 0

coder015
coder015

Reputation: 15

you can try in two ways.

1.left ctrl+F11

2.enable num lock then press 9.

Upvotes: -1

vbod
vbod

Reputation: 58

Check in your manifest if there is android:screenOrientation

    <activity
        android:name="com.your.activity"
        android:screenOrientation="sensorPortrait" >
    </activity>

If this is the case, delete the lines.

Upvotes: -3

Related Questions