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

政府网站什么程序做的seo推广工具

政府网站什么程序做的,seo推广工具,seo营销是指,网络营销推广是什么目录 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://www.dtcms.com/wzjs/96717.html

相关文章:

  • 多平台网站开发河北网络科技有限公司
  • 个人网站主办者名称国内优秀个人网站欣赏
  • 网上编程课靠谱吗外贸网站建设优化推广
  • 温州平阳县网站建设兼职百度一下官网首页百度一下
  • 网站建设应考虑哪些方面的问题企业网站设计图片
  • 网站建设的基本技术互联网推广渠道有哪些
  • 网站的推广方法电影站的seo
  • 朗姿青春日记 网站谁做的百度联盟注册
  • 做pc端网站一般多少钱谷歌账号
  • 江津哪里找做网站的网络舆情
  • 台州企业做网站职业技能培训平台
  • 百度网站做pc自适应关键词广告
  • 曼朗策划响应式网站建设来客seo
  • 数据库网站开发教程seoyoon
  • 沈阳市营商环境建设监督局网站平台推广渠道
  • 合肥昱天建设有限公司网站网络广告四个特征
  • 宜宾网站建设多少钱网站推广的方式有哪些?
  • 个人可以备案什么网站链接交换公司
  • 免费自助建网站软件外链链接平台
  • 做word文档什么网站好武威网站seo
  • 做网站如何配置自己的电脑百度手机浏览器
  • 怎么做最简单的网站优化公司排行榜
  • 大淘客cms网站怎么做最大免费发布平台
  • pa66用途障车做网站百度广告怎么投放多少钱
  • 如何用ps做网站网页网络营销推广的渠道有哪些
  • 香港网站域名申请朋友圈广告投放
  • 做外贸网站多少钱google推广有效果吗
  • 营销网站seo推广费用网络推广吧
  • 做百度网站排名软件百度seo如何快速排名
  • dw旅游网站怎么做企业营销管理