【问题标题】:Restrict portrait orientation for Ionic App限制 Ionic App 的纵向方向
【发布时间】:2015-03-28 19:55:10
【问题描述】:

我正在使用 Ionic、cordova 来制作应用程序。我试图将视图的方向限制为仅纵向,我在 config.xml 文件中执行以下操作,但它仍然没有任何想法?

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.ionicucas805049" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>ionicUcas</name>
  <description>
        An Ionic Framework and Cordova project.
    </description>
  <author email="hi@ionicframework" href="http://ionicframework.com/">
      Ionic Framework Team
    </author>
  <content src="index.html"/>
  <access origin="*"/>
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="BackupWebStorage" value="none"/>
  <preference name="Orienation" value="portrait" />
  <feature name="StatusBar">
    <param name="ios-package" value="CDVStatusBar" onload="true"/>
  </feature>
</widget>

我已添加&lt;preference name="Orienation" value="portrait" /&gt; 但没有喜悦....

【问题讨论】:

标签: cordova ionic


【解决方案1】:

config.xml 中的首选项设置区分大小写并且(很遗憾)不一致。

对于这个特定的设置,它都是小写的:

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

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-12-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-06-01
相关资源
最近更新 更多