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

阿里巴巴做国际网站多少钱淘宝手机网站模板下载安装

阿里巴巴做国际网站多少钱,淘宝手机网站模板下载安装,定南网站建设,开发安卓软件用什么工具上篇回顾#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.hkea.cn/news/14298067/

相关文章:

  • 广西网站推广优化厦门关键词优化平台
  • 网站目录做二级域名北京建设银行招聘网站
  • 上市公司协会网站建设汇报先做网站后备案
  • 网站策划书的政策背景如何自己设计图片
  • 房县建设局网站php开发做网站
  • 个人网站毕业设计作品wordpress国内商城主题
  • 可以做视频推广的网站怎么介绍自己做的网站效果图
  • 房产中介 网站开发东莞网站关键词排名
  • 自己做的网站403自己做影视网站
  • 湖南城市建设网站个人网页上传网站怎么做
  • 交做网贷的网站wordpress动画效果
  • 河北省电力建设第一工程公司网站wordpress没有小工具
  • iis默认网站删除大连网络推广公司哪家好
  • 精品网站建设哪家公司服务好在珠海注册公司需要什么资料
  • 沈阳外贸网站制作公司钉钉如何做自己的网站
  • 网站的建设运营收费是哪些智能建站
  • 成都网站建设推广港哥熊掌号wordpress怎么接入支付
  • 大灰狼网站更新升级通知icp备案号是什么意思
  • 南宁制作网站服务商网站建设步骤列表图片
  • 深圳建西站泰安润泽建设工程有限公司网站
  • wap音乐网站源码织梦网站密码忘记了
  • 在vs中做网站如何连接数据库奢侈品回收
  • 目前网站在初级建设阶段_需要大量数据丰富成都网站建设成都app开发
  • 电脑可以做服务器部署网站吗分类信息网站开发教程
  • 网站建设 硬件域名拍卖
  • p2c网站方案wordpress如何设置会员中心
  • 男女做那事视频免费网站网站seo工作内容
  • 没有网站如何做营销公司官网建设方案
  • 可以做软文推广的网站wordpress div属性
  • 公司的 SEO与网站建设免费的网站cms