【问题标题】:The "landscape" description for fixing the Android app screen in landscape orientation is not recognized无法识别横向修复 Android 应用屏幕的“横向”描述
【发布时间】:2020-02-19 07:33:09
【问题描述】:

我正在开发一个安卓应用程序。 语言是 HTML5 和 cordova。 我将以下代码添加到 manifest.json 作为参考。

但是,构建的应用程序的屏幕不是水平固定的。 除非装有应用程序的智能手机侧向转动,否则屏幕不会侧向转动。 即使智能手机垂直面对,我也想保持屏幕侧向。 我的代码有什么问题? 翻翻过往的日志,找不到明确的答案


{
  "name": "example",
  "short_name": ""example",",
  "description": ""example",",
  "display":      "standalone", 
  "orientation":  "landscape",
  "icons": [{
    "src": "images/icons/icon-48x48.png",
    "sizes": "48x48",
    "type": "image/png"
  },more....

当设备处于纵向时,需要保持与 Android 智能手机处于横向时相同的屏幕。

目前,当智能手机处于竖屏状态时,无法保持横屏,屏幕配置已更改为竖屏。

【问题讨论】:

    标签: android html cordova


    【解决方案1】:

    我找到并解决了最佳做法。 这不是使用 manifest.json。 我在这里真正想做的是让 config.xml 指向横向视图。

    <widget xmlns="http://www.w3.org/ns/widgets" id="com.example.foovar" version="1.3.0" android-versionCode="130">
    <preference name="Example" value="false"/>
    <preference name="Orientation" value="landscape"/>
    </widget>
    

    【讨论】:

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