簡體   English   中英

設置方向肖像phonegap android

[英]set orientation portrait phonegap android

我試圖在android的phonegap中設置orientraint,我修改了androidManifiest.xml

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

以及config.xml

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

從androidManifiest.xml中刪除<uses-feature android:name="android.hardware.screen.portrait" />

並添加此

android:screenOrientation="portrait"

這是你的androidMadifiest.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">

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM