Showing
5 changed files
with
14 additions
and
8 deletions
| @@ -76,7 +76,6 @@ export struct PageComponent { | @@ -76,7 +76,6 @@ export struct PageComponent { | ||
| 76 | onActionEnd(this.pageModel, this.pageAdvModel) | 76 | onActionEnd(this.pageModel, this.pageAdvModel) |
| 77 | }) | 77 | }) |
| 78 | ) | 78 | ) |
| 79 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 80 | 79 | ||
| 81 | } | 80 | } |
| 82 | 81 |
| @@ -311,8 +311,6 @@ export struct VideoChannelDetail { | @@ -311,8 +311,6 @@ export struct VideoChannelDetail { | ||
| 311 | .curve(Curves.initCurve(Curve.EaseIn)) | 311 | .curve(Curves.initCurve(Curve.EaseIn)) |
| 312 | .width('100%') | 312 | .width('100%') |
| 313 | .height('100%') | 313 | .height('100%') |
| 314 | - // 扩展至所有非安全区域 | ||
| 315 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 316 | .onChange((index: number) => { | 314 | .onChange((index: number) => { |
| 317 | this.currentIndex = index | 315 | this.currentIndex = index |
| 318 | console.info('onChange==', index.toString()) | 316 | console.info('onChange==', index.toString()) |
| @@ -72,7 +72,14 @@ struct MultiPictureDetailPage { | @@ -72,7 +72,14 @@ struct MultiPictureDetailPage { | ||
| 72 | onPageShow(): void { | 72 | onPageShow(): void { |
| 73 | console.log(TAG, 'onPageShow') | 73 | console.log(TAG, 'onPageShow') |
| 74 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 74 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| 75 | - | 75 | + /*// 获取当前应用窗口 |
| 76 | + let windowClass: window.Window = window.getLastWindow(this.context) | ||
| 77 | + // 将状态栏和导航栏的背景色设置为跟应用窗口相同的颜色 | ||
| 78 | + windowClass.setWindowSystemBarProperties({ | ||
| 79 | + navigationBarColor: color, | ||
| 80 | + statusBarColor: barColor, | ||
| 81 | + statusBarContentColor: barContentColor, | ||
| 82 | + })*/ | ||
| 76 | } | 83 | } |
| 77 | 84 | ||
| 78 | onPageHide(): void { | 85 | onPageHide(): void { |
| @@ -114,7 +114,7 @@ export struct BottomNavigationComponent { | @@ -114,7 +114,7 @@ export struct BottomNavigationComponent { | ||
| 114 | .barMode(BarMode.Fixed) | 114 | .barMode(BarMode.Fixed) |
| 115 | .barBackgroundColor(this.barBackgroundColor) | 115 | .barBackgroundColor(this.barBackgroundColor) |
| 116 | // 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域 | 116 | // 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域 |
| 117 | - .backgroundColor(this.barBackgroundColor) | 117 | + // .backgroundColor(this.barBackgroundColor) |
| 118 | .layoutWeight(1) | 118 | .layoutWeight(1) |
| 119 | 119 | ||
| 120 | Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor) | 120 | Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor) |
| @@ -33,6 +33,7 @@ export struct VideoChannelPage { | @@ -33,6 +33,7 @@ export struct VideoChannelPage { | ||
| 33 | // 传递给page的自动刷新通知 | 33 | // 传递给page的自动刷新通知 |
| 34 | @State autoRefresh2Page: number = 0 | 34 | @State autoRefresh2Page: number = 0 |
| 35 | @Provide showComment: boolean = false | 35 | @Provide showComment: boolean = false |
| 36 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 36 | aboutToAppear(): void { | 37 | aboutToAppear(): void { |
| 37 | this.setBarBackgroundColor() | 38 | this.setBarBackgroundColor() |
| 38 | console.log(TAG, 'aboutToAppear') | 39 | console.log(TAG, 'aboutToAppear') |
| @@ -71,7 +72,6 @@ export struct VideoChannelPage { | @@ -71,7 +72,6 @@ export struct VideoChannelPage { | ||
| 71 | } | 72 | } |
| 72 | .width('100%') | 73 | .width('100%') |
| 73 | .height('100%') | 74 | .height('100%') |
| 74 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | @Builder | 77 | @Builder |
| @@ -151,7 +151,9 @@ export struct VideoChannelPage { | @@ -151,7 +151,9 @@ export struct VideoChannelPage { | ||
| 151 | } | 151 | } |
| 152 | .zIndex(20) | 152 | .zIndex(20) |
| 153 | .height($r('app.float.top_tab_bar_height_common')) | 153 | .height($r('app.float.top_tab_bar_height_common')) |
| 154 | - .margin({ top: 10 }) | 154 | + .margin({ |
| 155 | + top: px2vp(this.topSafeHeight) | ||
| 156 | + }) | ||
| 155 | .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 157 | .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| 156 | 158 | ||
| 157 | } | 159 | } |
| @@ -180,7 +182,7 @@ export struct VideoChannelPage { | @@ -180,7 +182,7 @@ export struct VideoChannelPage { | ||
| 180 | channelId: item.channelId + '', | 182 | channelId: item.channelId + '', |
| 181 | autoRefresh: this.autoRefresh | 183 | autoRefresh: this.autoRefresh |
| 182 | }) | 184 | }) |
| 183 | - .padding({ top: 55 }) | 185 | + .padding({ top: px2vp(this.topSafeHeight) + 55 }) |
| 184 | .backgroundColor(Color.White) | 186 | .backgroundColor(Color.White) |
| 185 | } | 187 | } |
| 186 | }, (item: TopNavDTO) => item.channelId + '') | 188 | }, (item: TopNavDTO) => item.channelId + '') |
-
Please register or login to post a comment