Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yanlu
2024-05-09 14:44:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cba006dd99730c5e2b26ff1cf90382393247ae7b
cba006dd
1 parent
36867403
fix: 17083 版面-电子报页面_鸿蒙系统顶部图标未白色展示
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
View file @
cba006d
...
...
@@ -11,13 +11,14 @@ struct ENewspaper {
// 获取UIAbility上下文
context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext
async setSystemBar(color: string, barColor: string) {
async setSystemBar(color: string, barColor: string
, barContentColor: string
) {
// 获取当前应用窗口
let windowClass: window.Window = await window.getLastWindow(this.context)
// 将状态栏和导航栏的背景色设置为跟应用窗口相同的颜色
await windowClass.setWindowSystemBarProperties({
navigationBarColor: color,
statusBarColor: barColor,
statusBarContentColor: barContentColor,
})
}
...
...
@@ -45,12 +46,12 @@ struct ENewspaper {
}
onPageShow() {
this.setSystemBar('#80000000','#80000000')
this.setSystemBar('#80000000','#80000000'
, '#FFFFFFFF'
)
Logger.info(TAG, 'onPageShow');
}
onPageHide() {
this.setSystemBar('#FFFFFFFF','#00000000')
this.setSystemBar('#FFFFFFFF','#00000000'
, '#000000'
)
Logger.info(TAG, 'onPageHide');
}
...
...
Please
register
or
login
to post a comment