王士厅

频道全屏修改

... ... @@ -76,7 +76,6 @@ export struct PageComponent {
onActionEnd(this.pageModel, this.pageAdvModel)
})
)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
... ...
... ... @@ -311,8 +311,6 @@ export struct VideoChannelDetail {
.curve(Curves.initCurve(Curve.EaseIn))
.width('100%')
.height('100%')
// 扩展至所有非安全区域
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.onChange((index: number) => {
this.currentIndex = index
console.info('onChange==', index.toString())
... ...
... ... @@ -72,7 +72,14 @@ struct MultiPictureDetailPage {
onPageShow(): void {
console.log(TAG, 'onPageShow')
this.pageShowTime = DateTimeUtils.getTimeStamp()
/*// 获取当前应用窗口
let windowClass: window.Window = window.getLastWindow(this.context)
// 将状态栏和导航栏的背景色设置为跟应用窗口相同的颜色
windowClass.setWindowSystemBarProperties({
navigationBarColor: color,
statusBarColor: barColor,
statusBarContentColor: barContentColor,
})*/
}
onPageHide(): void {
... ...
... ... @@ -114,7 +114,7 @@ export struct BottomNavigationComponent {
.barMode(BarMode.Fixed)
.barBackgroundColor(this.barBackgroundColor)
// 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域
.backgroundColor(this.barBackgroundColor)
// .backgroundColor(this.barBackgroundColor)
.layoutWeight(1)
Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor)
... ...
... ... @@ -33,6 +33,7 @@ export struct VideoChannelPage {
// 传递给page的自动刷新通知
@State autoRefresh2Page: number = 0
@Provide showComment: boolean = false
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
aboutToAppear(): void {
this.setBarBackgroundColor()
console.log(TAG, 'aboutToAppear')
... ... @@ -71,7 +72,6 @@ export struct VideoChannelPage {
}
.width('100%')
.height('100%')
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
@Builder
... ... @@ -151,7 +151,9 @@ export struct VideoChannelPage {
}
.zIndex(20)
.height($r('app.float.top_tab_bar_height_common'))
.margin({ top: 10 })
.margin({
top: px2vp(this.topSafeHeight)
})
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
}
... ... @@ -180,7 +182,7 @@ export struct VideoChannelPage {
channelId: item.channelId + '',
autoRefresh: this.autoRefresh
})
.padding({ top: 55 })
.padding({ top: px2vp(this.topSafeHeight) + 55 })
.backgroundColor(Color.White)
}
}, (item: TopNavDTO) => item.channelId + '')
... ...