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
chenjun
2024-09-06 10:06:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ac688ce3fdaf8d134b87bee33b323c3814ef2a5d
ac688ce3
1 parent
ad2b6ac5
全屏时底部有块遮罩
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 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 @
ac688ce
...
...
@@ -8,7 +8,7 @@ import {
postInteractBrowsOperateParams
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { HttpUtils } from 'wdNetwork/Index';
import { DateTimeUtils, Logger, WindowModel } from 'wdKit/Index';
import { DateTimeUtils,
EmitterEventId, EmitterUtils,
Logger, WindowModel } from 'wdKit/Index';
import { PlayerBottomView } from '../view/PlayerBottomView';
import { PlayerRightView } from '../view/PlayerRightView';
import { DisplayDirection } from 'wdConstant/Index';
...
...
@@ -512,7 +512,11 @@ export struct DetailPlayShortVideoPage {
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
if (this.displayDirection === DisplayDirection.VERTICAL) {
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 @
ac688ce
...
...
@@ -29,7 +29,7 @@ export struct BottomNavigationComponent {
@Provide bottomRectHeight: number = 0
private bottomRectHeight1: string = AppStorage.get<number>('bottomSafeHeight') + 'px';
@Provide topRectHeight: number = 0
@
Provid
e isLayoutFullScreen: boolean = false
@
Stat
e isLayoutFullScreen: boolean = false
@Provide displayDirection: DisplayDirection = DisplayDirection.VERTICAL
@Provide isImmersive: boolean = false // 是否开启沉浸式模式 http://192.168.1.3:3300/project/3802/interface/api/189229
@Provide isNight: boolean = false // 是否开启夜间模式
...
...
@@ -72,6 +72,13 @@ export struct BottomNavigationComponent {
this.changeBottomNav(assignChannel)
}
})
EmitterUtils.receiveEvent(EmitterEventId.FULL_SCREEN, (str?: string) => {
Logger.debug(TAG, 'receiveEvent FULL_SCREEN: ' + str)
if (str) {
// 跳转指定频道场景,传参底导id、频道id
this.isLayoutFullScreen = str == '1' ? true : false
}
})
}
aboutToDisappear() {
...
...
@@ -120,8 +127,7 @@ export struct BottomNavigationComponent {
// 备注:鸿蒙目前只有修改三线导航背景方法,对于全面屏导航条手机需要设置背景色并使其扩散到导航区域
// .backgroundColor(this.barBackgroundColor)
.layoutWeight(1)
Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor)
Blank().width('100%').height(this.bottomRectHeight1).backgroundColor(this.barBackgroundColor).visibility(this.isLayoutFullScreen?Visibility.None:Visibility.Visible)
}.height('100%').width('100%')
}
...
...
Please
register
or
login
to post a comment