5

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?

greatwolf
  • 20,287
  • 13
  • 71
  • 105
redrom
  • 11,502
  • 31
  • 157
  • 264

1 Answers1

12

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

Community
  • 1
  • 1
Satish
  • 6,457
  • 8
  • 43
  • 63