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
chenquansheng
2024-10-30 15:49:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cc11453e61db012c53fbb9af3a360f1da627f895
cc11453e
1 parent
653ae9ac
fix |> 修复视频频道页面切换横竖屏出现底部tabbar问题
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
cc11453
...
...
@@ -308,7 +308,7 @@ export struct DetailPlayShortVideoPage {
this.playerHeight = px2vp(height)
this.playerWidth = px2vp(height * this.ratio)
}
//console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight)
//
console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight)
}
...
...
@@ -544,7 +544,7 @@ export struct DetailPlayShortVideoPage {
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
if (this.displayDirection === DisplayDirection.VERTICAL) {
if (this.displayDirection === DisplayDirection.VERTICAL) {
//0:转成竖屏,1:转成横屏
EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 0)
} else {
EmitterUtils.sendEvent(EmitterEventId.FULL_SCREEN, 1)
...
...
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
View file @
cc11453
...
...
@@ -71,7 +71,9 @@ export struct BottomNavigationComponent {
EmitterUtils.receiveEvent(EmitterEventId.FULL_SCREEN, (str?: string) => {
Logger.debug(TAG, 'receiveEvent FULL_SCREEN: ' + str)
// 跳转指定频道场景,传参底导id、频道id
this.isLayoutFullScreen = str == '1' ? true : false
setTimeout(()=>{
this.isLayoutFullScreen = str == '1' ? true : false
},200)
})
}
...
...
@@ -115,8 +117,7 @@ export struct BottomNavigationComponent {
.zIndex(10)
.scrollable(false)
.animationDuration(0)
.barHeight(this.displayDirection === DisplayDirection.VERTICAL ? $r('app.float.bottom_navigation_barHeight') :
0.001)
.barHeight(this.isLayoutFullScreen ? 0.001 : $r('app.float.bottom_navigation_barHeight'))
.barMode(BarMode.Fixed)
.barBackgroundColor(this.barBackgroundColor)
// 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域
...
...
@@ -127,7 +128,7 @@ export struct BottomNavigationComponent {
.height(this.bottomRectHeight1)
.backgroundColor(this.barBackgroundColor)
.visibility(this.isLayoutFullScreen ? Visibility.None : Visibility.Visible)
}.height('100%').width('100%')
}.height('100%').width('100%')
.backgroundColor(this.barBackgroundColor)
}
@Builder
...
...
@@ -152,7 +153,7 @@ export struct BottomNavigationComponent {
.width('100%')
.height($r('app.float.bottom_navigation_barHeight'))
.hoverEffect(HoverEffect.Highlight)
.visibility(this.
displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.Non
e)
.visibility(this.
isLayoutFullScreen ? Visibility.Hidden : Visibility.Visibl
e)
// .hitTestBehavior(HitTestMode.Block)
.onClick(() => {
// Logger.info(TAG, `onChange, index: ${index}`);
...
...
Please
register
or
login
to post a comment