设置方向肖像phonegap android

我正在尝试将方向设置为在phonegap中为Android倾斜,我修改了androidManifiedt.xml

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

还有config.xml

<preference name="orientation"                value="default" /> 

解决方法:

删除< uses-feature android:name =“ android.hardware.screen.portrait” />从您的androidManifiedt.xml

并添加此

android:screenOrientation="portrait"

这就是androidMadifiedt.xml的一部分的外观

<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">
上一篇:android-如何为ionic创建cordova插件


下一篇:javascript-离子应用无法识别android mobile中的语音