如何禁用窗口的全屏显示功能?

如何禁用窗口的全屏显示功能

阅读 536
1 个回答

可以在module.json5文件中通过配置abilities中的supportWindowMode字段去指定是否显示。

fullscreen表示支持全屏显示,split表示支持分屏显示,floating表示支持窗口化显示。

参考代码如下:

"abilities": [ 
  { 
    "name": "EntryAbility", 
    "srcEntry": "./ets/entryability/EntryAbility.ets", 
    "description": "$string:EntryAbility_desc", 
    "icon": "$media:icon", 
    "label": "$string:EntryAbility_label", 
    "startWindowIcon": "$media:icon", 
    "startWindowBackground": "$color:start_window_background", 
    "exported": true, 
    "supportWindowMode": ["split", "floating"], 
    "skills": [ 
      { 
        "entities": [ 
          "entity.system.home" 
        ], 
        "actions": [ 
          "action.system.home" 
        ] 
      } 
    ] 
  } 
]

参考链接

module.json5配置文件-abilities

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题