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

建筑学院app网站网站建设报告 商业价值

建筑学院app网站,网站建设报告 商业价值,wordpress 手机验证,河南怎样做网站推广上篇回顾#xff1a; ArtTS系统能力-通知的学习#xff08;3.1#xff09; 本篇内容#xff1a; ArtTS系统能力-窗口管理的学习#xff08;3.2#xff09; 一、 知识储备 1. 基本概念 窗口渲染式能力#xff1a;指对状态栏、导航栏等系统窗口进行控制#xff0c;减…上篇回顾 ArtTS系统能力-通知的学习3.1 本篇内容 ArtTS系统能力-窗口管理的学习3.2 一、 知识储备 1. 基本概念 窗口渲染式能力指对状态栏、导航栏等系统窗口进行控制减少状态栏、导航栏等系统界面的突兀感从而使用户获得更好的体验。 渲染式能力只在应用主窗口作为全屏窗口时生效通常情况下应用子窗口弹窗、悬浮窗口等辅助窗口无法使用沉浸式能力悬浮窗全局悬浮窗口是一种特殊的应用窗口具备在应用主窗口和对应Ability退到后台后仍然可以在前台显示的能力。 悬浮窗口可以用于应用退到后台后使用小窗继续播放视频、或者为特定的应用创建悬浮球等快速入口。应用在创建悬浮窗口前需要申请对应的权限ohos.permission.SYSTEM_FLOAT_WINDOW。 2.使用场景 设置应用主窗口属性及目标页面 在Stage模型下应用主窗口由UIAbility创建并维护其生命周期。在UIAbility的onWindowStageCreate回调中获取WindowStage即可对其进行属性设置也可以在应用配置文件中设置应用主窗口的属性。 createMainWindow(windowStage: window.WindowStage) {//第一步获取应用主窗口let windowClazz null;windowStage.getMainWindow((err, data) {if (err) {console.error(该设备不支持)return;}windowClazz data;//第二步设置主窗口属性let isTouchable true;windowClazz.setWindowTouchable(isTouchable, (err) {if (err) {console.error(不支持触摸)return;}})//第三步为主窗口加载对应的目标页面windowStage.loadContent(pages/StudyWidget, err {if (err.code) {console.error(响应失败)return;}})})}设置应用子窗口属性及目标页面 createSubWindow(windowStage: window.WindowStage) {windowStage.createSubWindow(mySubWindow, (err, data) { //1. 获取创建子窗口if (err) {console.error(不支持子窗口)return;}windowClazz data;})windowClazz.moveWindowTo(300, 300, err { //2. 设置子窗口属性if (err) {console.error(不支持子窗口移动)return;}})windowClazz.resize(500, 500, err { //3. 修改子窗口属性if (err.code) {console.error(不支持子窗口改变尺寸)}})windowClazz.setUIContent(pages/StudyLayout, err { //4. 加载对应的目标页面if (err.code) {console.error(子窗口加载页面失败)return;}windowClazz.showWindow(err {if (err.code) {console.error(子窗口页面显示失败)return;}})})}destroySubWindow() {windowClazz.destroyWindow(err {if (err.code) {console.error(子窗口销毁失败)return;}})}体验窗口沉浸式能力 setupWindow(windowStage: window.WindowStage) {let windowClazz null;windowStage.getMainWindow((err, data) {if (err.code) {console.error(${JSON.stringify(err)})return;}windowClazz data;let names [];windowClazz.setWindowSystemBarEnable(names, err {if (err.code) {console.error(${JSON.stringify(err)})return;}})})windowStage.loadContent(pages/StudyWidget, err {if (err.code) {console.error(${JSON.stringify(err)})return;}})}设置悬浮窗口 addFloatWindow(windowStage: window.WindowStage) {let windowClazz null;let config {name: floatWindow, windowType: window.WindowType.TYPE_FLOAT, ctx: this.context};window.createWindow(config, (err, data) {if (err.code) {console.error(不支持${JSON.stringify(err)})return;}windowClazz data;windowClazz.moveWindowTo(300,300,err{if (err.code) {console.error(JSON.stringify(err))return;}})windowClazz.resize(500,500,err {if (err.code) {console.error(JSON.stringify(err))return;}})windowClazz.setUIContent(pages/StudyWidget,err{if (err.code) {console.error(JSON.stringify(err))return;}windowClazz.showWindow(err{if (err.code) {console.error(JSON.stringify(err));return;}})})})} 二、 效果一览 三、源码剖析 import UIAbility from ohos.app.ability.UIAbility; import hilog from ohos.hilog; import window from ohos.window; import thermal from ohos.thermal;let windowClazz null;export default class EntryAbility extends UIAbility {onCreate(want, launchParam) {hilog.info(0x0000, testTag, %{public}s, 我被创建了);globalThis.initTitle 我是测试标题}onDestroy() {hilog.info(0x0000, testTag, %{public}s, 我被销毁了);}/*****************在这里定义LocalStorage*****************/args: Recordstring, Object {height: 111, age: 10, name: 小明, sex: 未知};storage: LocalStorage new LocalStorage(this.args)onWindowStageCreate(windowStage: window.WindowStage) {hilog.info(0x0000, testTag, %{public}s, 系统接管创建);// windowStage.loadContent(pages/event/EventStudy, this.storage) //把localStorage实例传递过去windowStage.loadContent(pages/manager/NotificationIndex, this.storage) //把localStorage实例传递过去// this.createMainWindow(windowStage)// this.createSubWindow(windowStage)// this.setupWindow(windowStage)this.addFloatWindow(windowStage)}/*****************在这里定义LocalStorage*****************/onWindowStageDestroy() {// Main window is destroyed, release UI related resourceshilog.info(0x0000, testTag, %{public}s, 系统接管销毁);this.destroySubWindow();}onForeground() {// Ability has brought to foregroundhilog.info(0x0000, testTag, %{public}s, 我要可见了);}onBackground() {// Ability has back to backgroundhilog.info(0x0000, testTag, %{public}s, 我不可见了);}createSubWindow(windowStage: window.WindowStage) {windowStage.createSubWindow(mySubWindow, (err, data) { //1. 获取创建子窗口if (err) {console.error(不支持子窗口)return;}windowClazz data;})windowClazz.moveWindowTo(300, 300, err { //2. 设置子窗口属性if (err) {console.error(不支持子窗口移动)return;}})windowClazz.resize(500, 500, err { //3. 修改子窗口属性if (err.code) {console.error(不支持子窗口改变尺寸)}})windowClazz.setUIContent(pages/StudyLayout, err { //4. 加载对应的目标页面if (err.code) {console.error(子窗口加载页面失败)return;}windowClazz.showWindow(err {if (err.code) {console.error(子窗口页面显示失败)return;}})})}destroySubWindow() {windowClazz.destroyWindow(err {if (err.code) {console.error(子窗口销毁失败)return;}})}addFloatWindow(windowStage: window.WindowStage) {let windowClazz null;let config {name: floatWindow, windowType: window.WindowType.TYPE_FLOAT, ctx: this.context};window.createWindow(config, (err, data) {if (err.code) {console.error(不支持${JSON.stringify(err)})return;}windowClazz data;windowClazz.moveWindowTo(300,300,err{if (err.code) {console.error(JSON.stringify(err))return;}})windowClazz.resize(500,500,err {if (err.code) {console.error(JSON.stringify(err))return;}})windowClazz.setUIContent(pages/StudyWidget,err{if (err.code) {console.error(JSON.stringify(err))return;}windowClazz.showWindow(err{if (err.code) {console.error(JSON.stringify(err));return;}})})})}setupWindow(windowStage: window.WindowStage) {let windowClazz null;windowStage.getMainWindow((err, data) {if (err.code) {console.error(${JSON.stringify(err)})return;}windowClazz data;let names [];windowClazz.setWindowSystemBarEnable(names, err {if (err.code) {console.error(${JSON.stringify(err)})return;}})})windowStage.loadContent(pages/StudyWidget, err {if (err.code) {console.error(${JSON.stringify(err)})return;}})}createMainWindow(windowStage: window.WindowStage) {//第一步获取应用主窗口let windowClazz null;windowStage.getMainWindow((err, data) {if (err) {console.error(该设备不支持)return;}windowClazz data;//第二步设置主窗口属性let isTouchable true;windowClazz.setWindowTouchable(isTouchable, (err) {if (err) {console.error(不支持触摸)return;}})//第三步为主窗口加载对应的目标页面windowStage.loadContent(pages/StudyWidget, err {if (err.code) {console.error(响应失败)return;}})})} }
http://www.zqtcl.cn/news/10730/

相关文章:

  • 网站首页动图怎么做网络公司网络推广
  • 网站设计培训学校有哪些个人网站怎么建立
  • 太原哪里做网站当今做哪个网站能致富
  • .net做网站的优缺点wordpress图片文件夹更换
  • 西安市建设局网站wordpress 全文
  • 惠东网站设计引航科技提供网站建设
  • 宇宙设计网站推荐申请网站网站
  • 政务网站开发方案wordpress 模版 怎么用
  • 温州建设集团网站首页网站首页快照更新快
  • 潍柴新建站登录网址呼图壁网站建设
  • 深圳网站建设服务哪个便宜啊最有效的推广学校的方式
  • 网站建设岗位说明网页设计师的主要职责
  • 网站增加二级域名wordpress移动端模板
  • wordpress大型站点建设高端网站公司
  • 网络营销网站建设与策划分析企业网站建设目的是什么
  • 青岛网站建设公司 中小企业补贴php商城
  • 有做全棉坯布的网站吗什么是网站建设
  • 网站开发定制宣传图片汕头网站推广找哪里
  • 东莞有口碑的教育网站建设wordpress 企业 模板 下载
  • 配送网站开发网站佣金怎么做会计科目
  • 网站建设期末作业要求daozicms企业建站系统
  • 建设学院网站的意义创办一个网站的费用
  • 番禺网站建设多少钱2021营业执照年检网上申报
  • 企业网站如何做推广东莞市做阀门的网站
  • 网站公司做文员内蒙古工程建设协会网站
  • 自己做付费网站东莞广告设计公司排名
  • 保定企业建站程序win没有wordpress
  • 石家庄自助建站模板响应式网站简单模板
  • 常德网站seo阿里巴巴网站头像你会放什么做头像
  • 莱芜公交网站淮安网站开发