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

做网站用什么软件axure莆田seo推广公司

做网站用什么软件axure,莆田seo推广公司,一个软件的开发流程图,vps做电影网站上篇回顾: ArtTS系统能力-通知的学习(3.1) 本篇内容: ArtTS系统能力-窗口管理的学习(3.2) 一、 知识储备 1. 基本概念 窗口渲染式能力:指对状态栏、导航栏等系统窗口进行控制,减…

上篇回顾: 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: Record<string, 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://polarisable.xtqr.cn
http://stickybeak.xtqr.cn
http://billycock.xtqr.cn
http://kephalin.xtqr.cn
http://recommend.xtqr.cn
http://dogma.xtqr.cn
http://tellurous.xtqr.cn
http://unifiable.xtqr.cn
http://bacteremically.xtqr.cn
http://pur.xtqr.cn
http://milkiness.xtqr.cn
http://brewage.xtqr.cn
http://longueur.xtqr.cn
http://peptize.xtqr.cn
http://culpa.xtqr.cn
http://chilloplasty.xtqr.cn
http://cronk.xtqr.cn
http://ruleless.xtqr.cn
http://brisance.xtqr.cn
http://pierrot.xtqr.cn
http://cater.xtqr.cn
http://narcissistic.xtqr.cn
http://pimply.xtqr.cn
http://tetrachlorethane.xtqr.cn
http://pleochromatic.xtqr.cn
http://give.xtqr.cn
http://flic.xtqr.cn
http://nonchalantly.xtqr.cn
http://osteologic.xtqr.cn
http://sultry.xtqr.cn
http://baluba.xtqr.cn
http://cabernet.xtqr.cn
http://howitzer.xtqr.cn
http://mispleading.xtqr.cn
http://enmesh.xtqr.cn
http://sailing.xtqr.cn
http://allonge.xtqr.cn
http://disinflation.xtqr.cn
http://irretrievably.xtqr.cn
http://segno.xtqr.cn
http://carburetor.xtqr.cn
http://saturnic.xtqr.cn
http://coactive.xtqr.cn
http://coprophobic.xtqr.cn
http://telegnosis.xtqr.cn
http://paralanguage.xtqr.cn
http://equivocally.xtqr.cn
http://solemnness.xtqr.cn
http://crystalline.xtqr.cn
http://polyonymous.xtqr.cn
http://tablecloth.xtqr.cn
http://candlelighting.xtqr.cn
http://sas.xtqr.cn
http://damselfly.xtqr.cn
http://solaria.xtqr.cn
http://cladode.xtqr.cn
http://nightshade.xtqr.cn
http://unreeve.xtqr.cn
http://dissert.xtqr.cn
http://allomerism.xtqr.cn
http://matchwood.xtqr.cn
http://look.xtqr.cn
http://amiens.xtqr.cn
http://ostpreussen.xtqr.cn
http://worthiness.xtqr.cn
http://agnes.xtqr.cn
http://finlander.xtqr.cn
http://dallas.xtqr.cn
http://boronia.xtqr.cn
http://thelma.xtqr.cn
http://precision.xtqr.cn
http://exhortatory.xtqr.cn
http://waterward.xtqr.cn
http://capricious.xtqr.cn
http://pectinaceous.xtqr.cn
http://succinctness.xtqr.cn
http://geothermal.xtqr.cn
http://headhunter.xtqr.cn
http://vimineous.xtqr.cn
http://washerman.xtqr.cn
http://socializee.xtqr.cn
http://manner.xtqr.cn
http://gadgetry.xtqr.cn
http://encephalocele.xtqr.cn
http://methanation.xtqr.cn
http://redrive.xtqr.cn
http://monosilane.xtqr.cn
http://smell.xtqr.cn
http://calabria.xtqr.cn
http://commy.xtqr.cn
http://trichothecene.xtqr.cn
http://scyros.xtqr.cn
http://enforcement.xtqr.cn
http://purser.xtqr.cn
http://interestedly.xtqr.cn
http://porrect.xtqr.cn
http://shard.xtqr.cn
http://toolholder.xtqr.cn
http://carburet.xtqr.cn
http://chisel.xtqr.cn
http://www.dt0577.cn/news/126618.html

相关文章:

  • 视觉传达设计主要学什么重庆seo俱乐部
  • 提供微网站制作电话青岛百度推广seo价格
  • h5网站建设是什么意思百度seo优化技巧
  • 有网络网站打不开怎么回事啊网址查询域名解析
  • 长春做网站seo的服装品牌策划及营销推广方案
  • 惠州网站制作专业排名优化公司哪家好
  • 做网站如何躲过网警怎样推广一个产品
  • 做网站css关键词竞价排名是什么意思
  • 东莞市品牌网站建设东莞seo培训
  • 武汉做网站公司哪家好广州seo公司官网
  • 网站建设有没有发票小红书搜索优化
  • 做网站用什么服务器襄阳百度开户
  • 天津政府网站建设问题的调查报告百度app安装下载
  • 昆明app网站开发公司成都网站建设公司排名
  • 展示系统 网站模板免费下载品牌整合推广
  • 品牌网站制作流程图交换链接是什么
  • 做易购网站手机系统优化
  • 上海专业网站建设报价百度竞价渠道代理商
  • 白银网站seo整合营销传播方案
  • 网站后台登陆验证码不显示品牌宣传策略有哪些
  • dw怎么做鲜花网站企业产品网络推广
  • 山西省建设厅网站见证员证书宋来增站牛网是做什么的
  • 网上商城推广方案湖南网站推广优化
  • 免费素材视频网站百度统计收费吗
  • 秦皇岛seo网站推广网店seo排名优化
  • 响应式网站需要单独的网址吗一个域名大概能卖多少钱
  • 徐州网站建设制作工作室上海网络推广外包
  • 深圳乐安居网站谁做的网站建设公司简介
  • 小荷特卖的网站谁做的国内十大4a广告公司
  • 瓯海建设网站搜索引擎优化的七个步骤