状态栏,状态栏,状态栏。。(而非导航栏)
隐藏状态栏。。(而不是沉侵式。。或者设置状态栏黑色或者白色)
如题 uniapp 打包安卓应用 怎么设置隐藏状态栏呢,,,
需要直接干掉状态栏 不让它显示出来

顽劣骑士
- 发布:2019-03-26 16:46
- 更新:2021-09-17 11:54
- 阅读:3891

l***@qq.com - 恩姆..
设置pages.json 文件中对应页面的“style” 节点 “titleNView” = false
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"titleNView": false,
"animationType": "fade-out",
"animationDuration": 200
}
}

隐藏导航栏
不要设置 "titleNView": false, 不然title为null 在onload 添加如下代码
var pages = getCurrentPages();
var page = pages[pages.length - 1];
// #ifdef APP-PLUS
var currentWebview = page.$getAppWebview();
var title= currentWebview.getTitleNView();
plus.webview.currentWebview().getStyle();
title.hide();
// #endif
隐藏状态栏
onliad 添加
plus.navigator.setFullscreen(true);
unload 添加
plus.navigator.setFullscreen(false);
顽劣骑士 (作者)
兄弟。。没用啊。。状态栏还是在。
2019-03-26 17:44
l***@qq.com
回复 顽劣骑士:你那是假的uniapp吧 看文档:https://uniapp.dcloud.io/collocation/pages?id=app-plus
每个页面均支持通过配置 titleNView 为 false 来禁用原生导航栏
2019-03-27 11:55