当前位置: 首页 > wzjs >正文

懂得做网站还可以做什么兼职青岛网页建站模板

懂得做网站还可以做什么兼职,青岛网页建站模板,精品课网站建设 辽宁,企业招聘网站目录 1.背景 2.解决方案 1.背景 在OpenHarmony 5.0中从设置界面打开手势导航开关然后重新关闭,此时设置界面导航栏和设置列表主界面重合,导致设置界面无法点击最下面的关于设备 2.解决方案 首先参考之前的如何设置导航栏文档,我们可以自己…

目录

1.背景

2.解决方案


1.背景

在OpenHarmony 5.0中从设置界面打开手势导航开关然后重新关闭,此时设置界面导航栏和设置列表主界面重合,导致设置界面无法点击最下面的关于设备

2.解决方案

首先参考之前的如何设置导航栏文档,我们可以自己再重新设置下导航栏样式及是否显示,然后在设置是否开始手势导航有一个

settings.display.navigationbar_status

属性,我们根据这个属性强制显示和隐藏导航栏

最终的patch如下:

@@ -22,8 +22,14 @@ import AbilityConstant from '@ohos.app.ability.AbilityConstant';import window from '@ohos.window';import router from '@ohos.router';import { UIContext } from '@ohos.arkui.UIContext';
+import { BusinessError } from '@ohos.base';
+import settings from '@ohos.settings';
+export default class MainAbility extends Ability {private funcAbilityWant;
+  private windowStage:window.WindowStage;
+  private isBackground = false
+onCreate(want, launchParam) {AppStorage.SetOrCreate('newWant', want);@@ -39,10 +45,61 @@ export default class MainAbility extends Ability {}onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam) {AppStorage.SetOrCreate('newWant', want);
-
+    this.setNavigationBarStatus();
+    setTimeout(()=>{
+      this.setNavigationBarStatus();
+    },500);this.toDetailPageFormUrl(want)}+  private setNavigationBarStatus() {
+    if (this.isBackground) {
+      return
+    }
+    const initValue = settings.getValueSync(this.context, 'settings.display.navigationbar_status', '1');
+    const navigationBarStatusValue = initValue === '0' ? false : true;
+    LogUtil.error("navigationBarStatusValue"+navigationBarStatusValue);
+    if (this.windowStage) {
+      let windowClass: window.Window | undefined = undefined;
+      this.windowStage.getMainWindow((err: BusinessError, data) => {
+        const errCode: number = err.code;
+        if (errCode) {
+          console.error(`Failed to obtain the main window. Cause code: ${err.code}, message: ${err.message}`);
+          return;
+        }
+
+        // 2.实现沉浸式效果:设置导航栏、状态栏显示。
+        // let names = ['status', 'navigation'];
+        // 2.实现沉浸式效果:设置导航栏、状态栏不显示。
+        let names: Array<'status' | 'navigation'>  = ['status'];
+        if (navigationBarStatusValue) {
+          names = ['status', 'navigation'];
+        }
+
+        windowClass = data;
+        windowClass.setWindowSystemBarEnable(names);
+        let SystemBarProperties: window.SystemBarProperties = {
+          //状态栏和导航栏背景颜色
+          statusBarColor: '#ffffff',
+          navigationBarColor: '#ffffff',
+          //以下两个属性从API Version8开始支持,状态栏和导航栏内容颜色
+          statusBarContentColor: '#000000',
+          navigationBarContentColor: '#000000'
+        };
+        try {
+          let promise = windowClass.setWindowSystemBarProperties(SystemBarProperties);
+          promise.then(() => {
+            console.info('Succeeded in setting the system bar properties.');
+          }).catch((err: BusinessError) => {
+            console.error(`Failed to set the system bar properties. Cause code: ${err.code}, message: ${err.message}`);
+          });
+        } catch (exception) {
+          console.error(`Failed to set the system bar properties. Cause code: ${exception.code}, message: ${exception.message}`);
+        }
+      });
+    }
+  }
+toDetailPageFormUrl(want) {window.getLastWindow(this.context).then((window: window.Window) => {let UIContext: UIContext = window.getUIContext();
@@ -54,6 +111,7 @@ export default class MainAbility extends Ability {}, router.RouterMode.Single)})}
+onWindowStageCreate(windowStage) {// Main window is created, set main page for this abilityLogUtil.log("[Main] MainAbility onWindowStageCreate")
@@ -76,6 +134,8 @@ export default class MainAbility extends Ability {GlobalContext.getContext().setObject(GlobalContext.globalKeySettingsAbilityContext, this.context);let want = GlobalContext.getContext().getObject(GlobalContext.globalKeyAbilityWant) as Wantthis.toDetailPageFormUrl(want)
+    this.windowStage = windowStage
+}onWindowStageDestroy() {
@@ -86,10 +146,12 @@ export default class MainAbility extends Ability {onForeground() {// Ability has brought to foregroundLogUtil.log("[Main] MainAbility onForeground")
+    this.isBackground = false}onBackground() {// Ability has back to backgroundLogUtil.log("[Main] MainAbility onBackground")
+    this.isBackground = true}};


文章转载自:

http://LPlMZ0Ka.yxwnn.cn
http://JhoHi1f8.yxwnn.cn
http://qrldnTct.yxwnn.cn
http://KLWxR0oU.yxwnn.cn
http://EoPc6kb0.yxwnn.cn
http://dTRfp2r0.yxwnn.cn
http://zrWuIhmj.yxwnn.cn
http://CIcnbOwL.yxwnn.cn
http://JaIBtzL5.yxwnn.cn
http://qE8rEICl.yxwnn.cn
http://gINehj4M.yxwnn.cn
http://eD8wbSfB.yxwnn.cn
http://8dlCHayG.yxwnn.cn
http://JMPF950O.yxwnn.cn
http://sNv7B7eE.yxwnn.cn
http://WyZyMrtC.yxwnn.cn
http://lOz7gMQM.yxwnn.cn
http://WAoo6WTA.yxwnn.cn
http://OyDUH2jK.yxwnn.cn
http://quhTJ81P.yxwnn.cn
http://ab2eHWhe.yxwnn.cn
http://937xCbQP.yxwnn.cn
http://j7kZtPUT.yxwnn.cn
http://omy7p0G8.yxwnn.cn
http://KMKSsuHt.yxwnn.cn
http://zypv7VPs.yxwnn.cn
http://6Oep7q33.yxwnn.cn
http://OrdIjUrz.yxwnn.cn
http://QnDUGs2I.yxwnn.cn
http://Lp2AhOYl.yxwnn.cn
http://www.dtcms.com/wzjs/624458.html

相关文章:

  • 马关县住房和城乡建设局网站河南做外贸网站的公司
  • 网站正能量视频不懂我意思吧百度云图片转wordpress
  • 网站建设的标签指的是上海app开发公司排名
  • vps网站打开需要身份验证自己制作的网站怎么做分页
  • 电影院网站建设方案禅城区网站建设
  • 高中制作网站怎么做wordpress查看购物车不管用
  • 做做网站下载2023店铺推广软文范文
  • 网站企业推广方案制作手机端网站开发
  • 镇江网站建设制作公司asp+网站开发
  • 网站做优化按点击收费重庆网站设计工作室
  • 岳阳县住房和城乡建设局网站网页设计所需软件
  • 海口网站建设方案推广最新项目加盟代理
  • 网站建设产品培训wordpress智慧面板
  • 4399曾经很火的网页游戏宁波seo网络优化哪家好
  • 网站出现的问题吗深圳it外包服务公司
  • 做视频类型的网站网站制作具体步骤
  • 保定专业做网站的公司域名购买方法
  • 中职教材 网站建设门户网站营销怎么做
  • 用新华做网站名是否侵权linode vps wordpress
  • 网站建设的公司有发展吗云平台网站叫什么
  • 网站开发及运营代理协议范本企业网站建设后期维护费用
  • 网站建设项目进展情况汇报天津工业设计公司
  • 绍兴网站建设报价网站做专业团队
  • 手机网站建设 苏州asp网站 上传空间
  • 网站开发售后工作126网易企业邮箱
  • 新乡网站网站建设小程序加盟代理前景
  • 免费网站一级域名注册创建wordpress用户访问数据库
  • 上传网站的软件seo培训
  • 常州行业网站南京高端网站制作
  • 网站设计应该做哪些昆明做公司官网的公司