问题
I have been doing testing with my android project, and I have built orientation change functionality into my app, but when I change the orientation in Eclipses emulator, it remains in portrait(or landscape depending on how it started).
EDIT**: The emulator itself rotates, but the APP doesnt.
And the public void onConfigurationChanged(Configuration c)
method is never called.
Yes I have put android:configChanges="orientation"
in my manifest
I would prefer not to have to buy a phone for testing, so help would be graciously appreciated!
回答1:
pres ctrl+f12 you will be able to get the emulator rotated. Emulator will by defaul will not rotate it will just present the view
回答2:
use numbers 9 and 7 in keyboard numpad
回答3:
Not sure about the runtime but try CTRL + F12.
回答4:
The Android Emulator orientation cannot be changed by orientation change events and therefore this question is closed.
来源:https://stackoverflow.com/questions/24511684/how-can-i-switch-orientation-at-runtime-in-eclipse-emulator