Question

Im trying to set orientate to potraint in phonegap for android, I modify the androidManifiest.xml

<uses-feature android:name="android.hardware.screen.portrait" />

and also the config.xml

<preference name="orientation"                value="default" /> 
Was it helpful?

Solution

Delete <uses-feature android:name="android.hardware.screen.portrait" /> from your androidManifiest.xml

and add this

android:screenOrientation="portrait"

This is how part of your androidMadifiest.xml should look

<activity android:name="HelloWorld" android:label="@string/app_name"
                android:theme="@android:style/Theme.Black.NoTitleBar"
                android:screenOrientation="portrait"
                android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top