Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquerymobile + Phonegap> how to stop page rotation? [duplicate]

I have a problem with JqueryMobile and Phonegap app. If I rotate the mobile phone, the app is reloaded from 'index.html'. Is this a bug in Jquerymobile or Phonegap? Is there any way to stop this page reload after a change in rotation or set rotation to a fixed position?

like image 678
redrom Avatar asked Jul 13 '11 16:07

redrom


1 Answers

You can lock the orientation, by setting this property:

AndroidManifest.xml

<activity   ........      android:screenOrientation="portrait">

or IOS in the property list (.plist file)

<dict>
`.....
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
    </array>
..........
</dict>

Disable auto-rotate in Jquery Mobile or PhoneGap

like image 199
Satish Avatar answered Nov 15 '22 12:11

Satish