Although cross platform development for mobile devices is so good. There isn't a simple option to disable auto-rotate or lock into one orientation i.e. portrait or landscape.
Is there anyway either in Jquery Mobile, PhoneGap, XUI anywhere ?
If yes then please help. Its driving me nuts.
To complete the answer above.
On iPhone add this to -info.plist:
<dict>
`.....
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
..........
</dict>
on Android to AndroidManifest.xml
<activity ........ android:screenOrientation="portrait">
For iOS, edit the PhoneGap.plist
file (e.g. in Xcode). Make sure only portrait is set and uncheck autorotate.
On Android, you need to edit AndroidManifest.xml
. Add android:screenOrientation="portrait"
in the activity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With