开发者

Landscape mode not working with no keyboard in AVD?

I've created two AVDs, one with hardware keyboard, and othe开发者_如何学JAVAr without..the one with keyboard shows the landscape mode in the android screen when I click CTRL + F11/F12 or 7/9 on numpad, but in the AVD with no hardware keyboard, the hardware things all change orientation, like the first AVD, but the android screen stays and doesn't change orientation to landscape, like this: http://img571.imageshack.us/img571/3624/landscapeh.jpg


This is a bug in the 2.3 AVD and it is already answered here

Android - Emulator in landscape mode, screen does not rotate


  1. Run 'Android SDK and AVD Manager'
  2. Select AVD
  3. Edit
  4. check Keyboard lid support if value is no, set to yes.
  5. Run AVD and try

Good luck!!


I had the same problem with an API 19 (Android 4.4.2). I had wanted to only support running in Landscape mode. Despite setting Orientation to Portrait when editing the device (under Startup size and orientation), the device would always start Portrait.

I ended up manually switching the width and height in the hardware-qemui.ini file.

So, edit this file in a text editor:

C:\Users\<user>\.android\avd\<deviceName>.avd\hardware-qemu.ini

Switch the values of the width and height, so that the width is longer than the height:

hw.lcd.width = 800
hw.lcd.height = 480

The AVD now boots in Landscape mode. The orientation may still be changed with shortcut keys.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜