why does the gingerbread emulator orientation get stuck in apps?

痞子三分冷 提交于 2019-12-29 05:46:11

问题


At first I thought this was a problem with my app, but it seems to be happening in any app (though interestingly, not the home screen) in the gingerbread emulator.

To replicate my issue, open eclipse and fire up the android emulator for gingerbread (I'm using the "Google APIs - API Level 9" as my target)

So the procedure to duplicate once the emulator loads is

press LCtrl-F11 to shift orientation to landscape, then again to switch to portrait

Result:
In the homescreen:
The view rotates to landscape, and then back to portrait, as expected

In any app (i've tried browser, calculator, maps, and the app i'm currently working on):
the view rotates to landscape, and then nothing, it stays in landscape even the emulator is displaying the phone in landscape mode (see below)

Has anyone else had this issue, or have I installed the emulator in some incorrect way - this hasn't been an issue with any of the previous emulators


回答1:


Actually, I have run into that problem occasionally before, though it does seem to get progressively worse with each passing tools release. There is nothing wrong with your installation or how you are using the program, AFAIK. You might try using Ctrl-F12 to switch back rather than Ctrl-F11 and see if that improves matters. I think the problem may stem from the emulator trying to emulate four-way orientation, but that is just a guess.




回答2:


This is a bug with the Android emulator running 2.3.x. Bug is already acknowledged here




回答3:


I just got stuck with the same problem in my own application. The app always stays in lanscape mode after using the camera. The only workaround I found is to click on the home button (emulator changes to portrait mode) and then click again on my application to get back to it also in portrait mode.

Did anybody report that bug already?

(Gingerbread emulator, Eclipse 3.5.x, Android Development Tools 8.0.1.v201012062107-82219)



来源:https://stackoverflow.com/questions/4469519/why-does-the-gingerbread-emulator-orientation-get-stuck-in-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!