当前位置:网站首页>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
边栏推荐
- Filtering of PCL
- 【TS】1368- 秒懂 TypeScript 泛型工具类型!
- 华为联机对战服务玩家掉线重连案例总结
- 洛谷 P1892 [BOI2003]团伙(并查集变种 反集)
- Luogu p1892 [boi2003] Gang (and search for variant anti set)
- P1055 [noip2008 popularization group] ISBN number
- PCL 投影点云
- JS settimeout() and interview questions
- 【快应用】text组件里的文字很多,旁边的div样式会被拉伸如何解决
- Shapiro Wilk normal analysis by SPSS
猜你喜欢

618再次霸榜的秘密何在?耐克最新财报给出答案

Mysql database remote access permission settings

Matlab processing of distance measurement of experimental electron microscope

2022-06-17

Dialogue Wu Gang: why do I believe in the rise of "big country brands"?

使用华为性能管理服务,按需配置采样率

Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)

(5) Gear control setting of APA scene construction
![[AI application] Hikvision ivms-4200 software installation](/img/4e/1640e3cafac13ce4d39520195c3217.png)
[AI application] Hikvision ivms-4200 software installation

Special topic of binary tree -- Logu p1229 traversal problem (the number of traversals in the middle order is calculated when the pre and post order traversals of the multiplication principle are know
随机推荐
全网显示 IP 归属地,是怎么实现的?
Kustomize使用手册
Overview of integrated learning
PCL eigen introduction and simple use
MySQL lethal serial question 3 -- are you familiar with MySQL locks?
正则及常用公式
JVM之垃圾回收器
Primary key policy problem
[AI application] Hikvision ivms-4200 software installation
【深入浅出玩转FPGA学习2----设计技巧(基本语法)】
Hdu1234 door opener and door closer (water question)
[SUCTF2018]followme
Easyexcel, a concise, fast and memory saving excel processing tool
JSP webshell免杀——JSP的基础
实验电镜距离测量之Matlab处理
JSP webshell免杀——webshell免杀
面对不确定性,供应链的作用
Leetcode+ 76 - 80 storm search topic
集成学习概览
Introduction to MySQL 8 DBA foundation tutorial