如何将手机屏幕应用程序的方向锁定为肖像?
我当前的config.xml使用此首选项:
< preference name =“orientation”value =“portrait”/>
然而,它没有任何区别,我仍然可以通过旋转我的移动测试设备来定位我的应用程序在两个方向.
另外,如果你知道一个活跃的phonegap / cordova社区,你可以发一个链接吗?
解决方法:
android:screenorientation="portrait"
到platform / android / AndroidManifest.xml文件中的主活动标记.
所以
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:name="inappbrowser" android:theme="@android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
变
<activity android:screenorientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:name="inappbrowser" android:theme="@android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
如果您想要其他肖像变化,请另外注意.来自:http://developer.android.com/guide/topics/manifest/activity-element.html
您可以使用reversePortrait或sensorPortrait
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。