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
yanlu
2024-05-08 11:31:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
62f7f1d75a9986999bf5e8678fea1ef3692eeb85
62f7f1d7
1 parent
2c570a47
fix:16922 早晚报-退出早晚报列表不该有下拉展示顶部效果
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
25 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
sight_harmony/products/phone/src/main/ets/pages/MorningEveningPaperPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
62f7f1d
...
...
@@ -99,8 +99,8 @@ export struct MorningEveningPaperComponent {
async aboutToAppear() {
let windowHight: window.Window = await window.getLastWindow(getContext(this));
await windowHight.setWindowLayoutFullScreen(true);
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
// await windowHight.setWindowLayoutFullScreen(true);
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
...
...
@@ -178,9 +178,9 @@ export struct MorningEveningPaperComponent {
}
async aboutToDisappear() {
let windowHight: window.Window = await window.getLastWindow(getContext(this));
await windowHight.setWindowLayoutFullScreen(false);
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
// let windowHight: window.Window = await window.getLastWindow(getContext(this));
// await windowHight.setWindowLayoutFullScreen(false);
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
}
onPageHide() {
...
...
@@ -209,25 +209,18 @@ export struct MorningEveningPaperComponent {
})
}
}
// .backgroundColor('#fff7b348')
// .backgroundColor(Color.Blue)
.height('100%')
// .margin({ left: 12, right: 12 })
PaperTitleComponent()// PaperTitleComponent({
// // title: this.morningEveningPaperDTO?.topicInfo?.title ?? "",
// title: this.title ?? "",
// // subtitle: this.morningEveningPaperDTO?.topicInfo?.topicDate ?? ''
// subtitle: this.subTitle
// })
// .margin({ left: 14, right: 14 })
PaperTitleComponent().margin({
top: this.topSafeHeight
})
}
.width('100%')
.height('100%')
// .backgroundColor(Color.Black)
// .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black)
.backgroundColor(this.mixedBgColor ?? Color.Black)
.padding({ top: this.topSafeHeight })
}
@Builder
...
...
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
View file @
62f7f1d
...
...
@@ -11,15 +11,13 @@ struct ENewspaper {
// 获取UIAbility上下文
context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext
async setSystemBar(color: string) {
async setSystemBar(color: string
, barColor: string
) {
// 获取当前应用窗口
let windowClass: window.Window = await window.getLastWindow(this.context)
// 将状态栏和导航栏的背景色设置为跟应用窗口相同的颜色
await windowClass.setWindowSystemBarProperties({
navigationBarColor: color,
statusBarColor: color,
// navigationBarContentColor: "#00FF00",
// statusBarContentColor: "#00FF00"
statusBarColor: barColor,
})
}
...
...
@@ -47,12 +45,12 @@ struct ENewspaper {
}
onPageShow() {
this.setSystemBar('#80000000')
this.setSystemBar('#80000000'
,'#80000000'
)
Logger.info(TAG, 'onPageShow');
}
onPageHide() {
this.setSystemBar('#FFFFFFFF')
this.setSystemBar('#FFFFFFFF'
,'#00000000'
)
Logger.info(TAG, 'onPageHide');
}
...
...
sight_harmony/products/phone/src/main/ets/pages/MorningEveningPaperPage.ets
View file @
62f7f1d
import { MorningEveningPaperComponent } from 'wdComponent';
import { Logger } from 'wdKit';
import { Logger
, WindowModel
} from 'wdKit';
const TAG = 'MorningEveningPaperPage';
@Entry
@Component
struct MorningEveningPaperPage {
@State isPageShow: boolean = false
build() {
Column() {
MorningEveningPaperComponent()
}
.width('100%')
.height('100%')
}
pageTransition() {
// 定义页面进入时的效果,从底侧滑入
PageTransitionEnter({ type: RouteType.None, duration: 300 })
.slide(SlideEffect.Bottom)
.slide(SlideEffect.Bottom).onEnter((type: RouteType, progress: number) => {
if (progress >= 0.99) {
WindowModel.shared.setWindowLayoutFullScreen(true)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
}
})
// 定义页面退出时的效果,向底侧滑出
PageTransitionExit({ type: RouteType.None, duration: 300 })
.slide(SlideEffect.Bottom)
...
...
@@ -31,9 +39,16 @@ struct MorningEveningPaperPage {
onPageShow() {
Logger.info(TAG, 'onPageShow');
if (this.isPageShow) {
WindowModel.shared.setWindowLayoutFullScreen(true)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
}
}
onPageHide() {
WindowModel.shared.setWindowLayoutFullScreen(false)
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
this.isPageShow = true
Logger.info(TAG, 'onPageHide');
}
...
...
Please
register
or
login
to post a comment