why does the gingerbread emulator orientation get stuck in apps?
Asked Answered
C

3

17

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)

enter image description here

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

Conrad answered 17/12, 2010 at 10:19 Comment(0)
D
6

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.

Dellinger answered 17/12, 2010 at 11:21 Comment(1)
While switching between Ctrl-F12 and Ctrl-F11 doesn't help the issue, it is good to know that this an emulator problem and not my code - hopefully it doesn't affect the Nexus S!Conrad
B
11

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

Bradney answered 26/1, 2011 at 8:30 Comment(0)
D
6

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.

Dellinger answered 17/12, 2010 at 11:21 Comment(1)
While switching between Ctrl-F12 and Ctrl-F11 doesn't help the issue, it is good to know that this an emulator problem and not my code - hopefully it doesn't affect the Nexus S!Conrad
W
2

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)

Wey answered 15/1, 2011 at 17:45 Comment(2)
I haven't reported the bug (don't really know how), but I have tested my app on a gingerbread phone (not emulator), and it didn't seem to have that problemConrad
I don't think it's a device problem but more an emulator problem. I switched to Eclair now for testing, because FroYo has also some bugs with the camera crashing :)Wey

© 2022 - 2024 — McMap. All rights reserved.