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
张善主
2024-05-06 17:12:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e169e15ff49c4319fb16488fb7c1301aa125a87c
e169e15f
1 parent
81daeed0
feat(查看图片):沉浸式
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
sight_harmony/features/wdComponent/src/main/ets/pages/MultiPictureListPage.ets
sight_harmony/features/wdComponent/src/main/resources/base/element/float.json
sight_harmony/features/wdComponent/src/main/ets/pages/MultiPictureListPage.ets
View file @
e169e15
...
...
@@ -3,6 +3,7 @@ import { display, router } from '@kit.ArkUI';
import { ImageItemView } from '../components/view/ImageItemView';
import { ImageDownloadComponent } from '../components/ImageDownloadComponent';
import { Action } from 'wdBean';
import { WindowModel } from 'wdKit/Index';
const TAG = 'MultiPictureListPage';
...
...
@@ -23,6 +24,7 @@ export struct MultiPictureListPage {
// @Provide bgc: Color = Color.White;
aboutToAppear(): void {
this.openFullScreen()
//获取宽高尺寸
this.screenWidth = this.displayTool.width
// this.picWidth = this.screenWidth - vp2px(52)
...
...
@@ -130,10 +132,36 @@ export struct MultiPictureListPage {
}
.width('100%')
.height('100%')
.padding({top:$r('app.float.margin_44')})
.backgroundColor(Color.Black)
.id('e_picture_container')
// 设置顶部绘制延伸到状态栏
// 设置底部绘制延伸到导航条
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
}
/**
* 开启沉浸式
* TODO:颜色待根据业务接口修改
*/
openFullScreen() {
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
WindowModel.shared.setWindowLayoutFullScreen(true)
// WindowModel.shared.setWindowSystemBarEnable([])
}
aboutToDisappear(): void {
console.log(TAG, 'aboutToDisappear')
this.closeFullScreen()
}
/**
* 关闭沉浸式
* TODO:颜色待根据业务接口修改
*/
closeFullScreen() {
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
WindowModel.shared.setWindowLayoutFullScreen(false)
// WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation'])
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/resources/base/element/float.json
View file @
e169e15
...
...
@@ -221,6 +221,10 @@
"value"
:
"36vp"
},
{
"name"
:
"margin_44"
,
"value"
:
"44vp"
},
{
"name"
:
"vp_3"
,
"value"
:
"3vp"
},
...
...
Please
register
or
login
to post a comment