I am trying to test my app on different devices and am having problems with the Nexus 4 and Nexus Galaxy Emulators. They are doing the opposite of what I expect them to do, they are locking in portrait instead of landscape.
<activity
android:name="org.myApp.Main"
android:screenOrientation="userLandscape"
I have tested on devices and emulators for Nexus 7,10 and 1 and they are all fine.
Is this a problem with the emulator or are these devices different. Unfortunately I do not have a device available now to test on.
You can test with
android:screenOrientation="landscape"
and see here differences between userLandscape and landscape :
http://developer.android.com/guide/topics/manifest/activity-element.html#screen
I just tried changing to Landscape rather than userLandscape and it seem ok now. android:screenOrientation="landscape"
My problem was my AVD was running API 17 and user userLandscape Is 18
SensorLandscape is best for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.