当前位置:网站首页>One trick to quickly realize custom application titlebar
One trick to quickly realize custom application titlebar
2022-07-02 11:00:00 【Huawei Developer Forum】
background
Fast application system comes with titleBar The default is on the left , And it cannot be customized , The requirements encountered by developers in the development process are displayed in the middle of the top , Not on the left . This article aims to help developers realize customization titleBar.
Implementation steps
Customize titleBar The implementation is divided into two steps .
1、manifest.json Set in file as titleBar Property is set to false, Hide the system's own titeBar.
"display": {
"titleBar": false,
"pages": {
"Hello": {
"statusBarBackgroundColor": "#0faeff"
}
}
}2、 Implement customization titleBar, Use one text Components , And make it display in the center .
<template>
<!-- Only one root node is allowed in template. -->
<div class="container">
<text class="txt">titlebar</text>
<div class="label">
<text style="font-size: 60px">this is test page</text>
</div>
</div>
</template>
<style>
.container {
flex-direction: column;
align-items: center;
}
.txt {
font-size: 60px;
color: #00ced1;
margin-top: 15px;
}
.label {
flex-direction: column;
justify-content: center;
width: 100%;
height: 100%;
}
</style>
<script>
module.exports = {
data: {
status: 1
},
onInit() {
},
onShow(options) {
'// Do something when show.'
},
}
</script>design sketch :

For more details , See quick apply manifest The file is introduced :
https://developer.huawei.com/consumer/cn/doc/development/quickApp-Guides/quickapp-develop-deeplink
边栏推荐
- 618再次霸榜的秘密何在?耐克最新财报给出答案
- 面对不确定性,供应链的作用
- AppGallery Connect场景化开发实战—图片存储分享
- 二叉树专题--P1030 [NOIP2001 普及组] 求先序排列
- nodejs+express+mysql简单博客搭建
- In the face of uncertainty, the role of supply chain
- QT学习日记8——资源文件添加
- php中self和static在方法中的区别
- 618 what is the secret of dominating the list again? Nike's latest financial report gives the answer
- [SUCTF2018]followme
猜你喜欢
![2.hacking-lab脚本关[详细writeup]](/img/f3/29745761cd5ad4df84c78ac904ea51.png)
2.hacking-lab脚本关[详细writeup]

JSP webshell free -- webshell free

二叉树专题--AcWing 1589. 构建二叉搜索树

The URL in the RTSP setup header of the axis device cannot take a parameter

华为游戏初始化init失败,返回错误码907135000

二叉树专题--AcWing 1497. 树的遍历(利用后、中序遍历,构建二叉树)
![2. Hacking lab script off [detailed writeup]](/img/f3/29745761cd5ad4df84c78ac904ea51.png)
2. Hacking lab script off [detailed writeup]

华为快应用中如何实现同时传递事件对象和自定义参数

Special topic of binary tree -- acwing 18 Rebuild the binary tree (construct the binary tree by traversing the front and middle order)

Special topic of binary tree -- acwing 1589 Building binary search tree
随机推荐
主键策略问题
从MediaRecord录像中读取H264参数
Special topic of binary tree -- acwing 1589 Building binary search tree
Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)
Special topic of binary tree -- acwing 18 Rebuild the binary tree (construct the binary tree by traversing the front and middle order)
Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)
Luogu p1892 [boi2003] Gang (and search for variant anti set)
二叉树专题--AcWing 1589. 构建二叉搜索树
【AGC】如何解决事件分析数据本地和AGC面板中显示不一致的问题?
Use of vscode tool
长投学堂上面的账户安全吗?
js promise. all
Special topic of binary tree -- acwing 3540 Binary search tree building (use the board to build a binary search tree and output the pre -, middle -, and post sequence traversal)
华为游戏初始化init失败,返回错误码907135000
MySQL lethal serial question 4 -- are you familiar with MySQL logs?
华为AppLinking中统一链接的创建和使用
2022爱分析· 国央企数字化厂商全景报告
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
面对不确定性,供应链的作用
js数组常用方法