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

建一个论坛网站要多少钱专门做课件的网站

建一个论坛网站要多少钱,专门做课件的网站,建网站花多少钱,wordpress后台超慢一、前言 静态快捷方式是一种在系统中创建的可以快速访问应用程序或特定功能的链接。它通常可以在长按应用图标#xff0c;以图标和相应的文字出现在应用图标的上方#xff0c;用户可以迅速启动对应应用程序的组件。使用快捷方式#xff0c;可以提高效率#xff0c;节省了查…一、前言 静态快捷方式是一种在系统中创建的可以快速访问应用程序或特定功能的链接。它通常可以在长按应用图标以图标和相应的文字出现在应用图标的上方用户可以迅速启动对应应用程序的组件。使用快捷方式可以提高效率节省了查找和打开对应的组件时间也可以实现个性化定制的需求创建多个快捷方式以满足个性化的工作流程和操作偏好。应用配置静态快捷方式在桌面上展示的效果如下图 安装该应用后在桌面上长按该应用图标在应用的图标上方会出现开发者配置的快捷方式“创建应用静态快捷方式详情”和“分享好友”点击对应的标签即可拉起对应的组件。 二、shortcuts标签 shortcuts标识应用的快捷方式信息。标签值为数组包含四个子标签shortcutId、label、icon、wants。 metadata中指定shortcut信息其中 name指定shortcuts的名称使用ohos.ability.shortcuts作为shortcuts信息的标识。resource指定shortcuts信息的资源位置。 shortcuts标签说明 属性名称含义类型是否可缺省shortcutId标识快捷方式的ID取值为长度不超过63字节的字符串。不支持通过资源索引的方式$string配置该字段。字符串该标签不可缺省。label标识快捷方式的标签信息即快捷方式对外显示的文字描述信息。取值为长度不超过255字节的字符串可以是描述性内容也可以是标识label的资源索引。字符串该标签可缺省缺省值为空。icon标识快捷方式的图标取值为资源文件的索引。字符串该标签可缺省缺省值为空。wants标识快捷方式内定义的目标wants信息集合在调用launcherBundleManager的startShortcut接口时会拉起wants标签里的第一个目标组件推荐只配置一个wants元素。对象该标签可缺省缺省为空。 三、配置方法 2.1 配置快捷方式的配置文件。 开发者若要配置静态快捷方式可以在某个模块的/resources/base/profile/目录下配置快捷方式的配置文件如shortcuts_config.json。 {shortcuts: [{shortcutId: id_test1, // 标识快捷方式在应用有多个快捷方式时该字段可作为快捷方式的唯一标识符label: $string:share, // 标识该快捷方式对外显示的文字icon: $media:share_icon, // 标识该快捷方式对外显示的图片wants: [{bundleName: com.ohos.hello, // 对应该快捷方式对应拉起组件的包名moduleName: entry, // 对应该快捷方式对应拉起组件的模块名abilityName: EntryAbility, // 对应该快捷方式对应拉起组件的组件名parameters: {testKey: testValue // 表示拉起快捷方式时的自定义数据}}]}] }示例图 2.2 在应用module.json5文件中配置metadata指向快捷方式的配置文件。 在module.json5配置文件的abilities标签中针对需要添加快捷方式的UIAbility进行配置metadata标签使shortcut配置文件对该UIAbility生效。 {module: {// ...abilities: [{name: EntryAbility,srcEntry: ./ets/entryability/EntryAbility.ets,// ...metadata: [{name: ohos.ability.shortcuts, // 配置快捷方式该值固定为ohos.ability.shortcutsresource: $profile:shortcuts_config // 指定shortcuts信息的资源位置}]}]} }示例图 四、示例 效果图 示例代码 shortcuts_config.json {shortcuts: [{shortcutId: 1,label: $string:create_short_cut_detail,icon: $media:icon_create_shortcut,wants: [{bundleName: com.example.learnharmonyos,moduleName: entry,abilityName: ShortcutsEntryAbility,parameters: {pageType: 1}}]},{shortcutId: 2,label: $string:share_friend,icon: $media:icon_share,wants: [{bundleName: com.example.learnharmonyos,moduleName: entry,abilityName: ShortcutsEntryAbility,parameters: {pageType: 2}}]}] }module.json5 abilities: [{name: EntryAbility,srcEntry: ./ets/entryability/EntryAbility.ets,description: $string:EntryAbility_desc,icon: $media:layered_image,label: $string:EntryAbility_label,startWindowIcon: $media:startIcon,startWindowBackground: $color:start_window_background,exported: true,skills: [{entities: [entity.system.home],actions: [action.system.home]}],metadata: [{// 配置快捷方式该值固定为ohos.ability.shortcutsname: ohos.ability.shortcuts,// 指定shortcuts信息的资源位置resource: $profile:shortcuts_config}]}]BackToHomeComponent.ets import { common, Want } from kit.AbilityKit; import { hilog } from kit.PerformanceAnalysisKit; import { BusinessError } from kit.BasicServicesKit;const TAG: string [BackToHomeComponent]; const DOMAIN_NUMBER: number 0xFF00;Component export struct BackToHomeComponent {pageName: string build() {Button(回到首页).fontColor($r(app.color.c_black)).fontWeight(FontWeight.Medium).fontSize(20).padding(10).onClick(() {let context: common.UIAbilityContext getContext(this) as common.UIAbilityContext; // UIAbilityContext// 在FuncAbility中通过调用terminateSelf()方法实现。// context为需要停止的UIAbility实例的AbilityContextlet wantInfo: Want {deviceId: , // deviceId为空表示本设备bundleName: com.example.learnharmonyos,moduleName: entry, // moduleName非必选abilityName: EntryAbility,parameters: {// 自定义信息info: this.pageName},}context.startAbility(wantInfo).then(() {hilog.info(DOMAIN_NUMBER, TAG, startAbility EntryAbility 首页 success.);}).catch((error: BusinessError) {hilog.error(DOMAIN_NUMBER, TAG, startAbility EntryAbility 首页 failed.);})context.terminateSelf((err) {if (err.code) {hilog.error(DOMAIN_NUMBER, TAG,Failed to terminate self. Code is ${err.code}, message is ${err.message});return;}});})} }CreateShortCutInfo.ets import { webview } from kit.ArkWeb import { BackToHomeComponent } from ./BackToHomeComponentEntry Component struct CreateShortCutInfo {private webviewController: webview.WebviewController new webview.WebviewController();private url: string https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/typical-scenario-configuration-V5build() {Column({ space: 10 }) {BackToHomeComponent({ pageName: CreateShortCutInfo })Web({ src: this.url, controller: this.webviewController })}.height(100%).width(100%)} }ShortCutShare.ets import { BackToHomeComponent } from ./BackToHomeComponentEntry Component struct ShortCutShare {State message: string 分享成功;build() {Column({ space: 10 }) {BackToHomeComponent({ pageName: ShortCutShare })Text(this.message).fontSize(10).fontWeight(FontWeight.Bold).margin({ top: 20 })}.width(100%).height(100%)} }ShortcutsEntryAbility.ets import { AbilityConstant, UIAbility, Want } from kit.AbilityKit; import { hilog } from kit.PerformanceAnalysisKit; import { window } from kit.ArkUI;export default class ShortcutsEntryAbility extends UIAbility {shortcutsEntryAbilityWant: Want | undefined undefinedonCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {hilog.info(0x0000, testTag, %{public}s, Ability onCreate);this.shortcutsEntryAbilityWant want;}onDestroy(): void {hilog.info(0x0000, testTag, %{public}s, Ability onDestroy);}onWindowStageCreate(windowStage: window.WindowStage): void {// Main window is created, set main page for this abilityhilog.info(0x0000, testTag, %{public}s, Ability onWindowStageCreate);let router pages/shortcuts/CreateShortCutInfoif (this.shortcutsEntryAbilityWant?.parameters?.pageType this.shortcutsEntryAbilityWant?.parameters?.pageType 2) {router pages/shortcuts/ShortCutShare}windowStage.loadContent(router, (err) {if (err.code) {hilog.error(0x0000, testTag, Failed to load the content. Cause: %{public}s, JSON.stringify(err) ?? );return;}hilog.info(0x0000, testTag, Succeeded in loading the content.);});}onWindowStageDestroy(): void {// Main window is destroyed, release UI related resourceshilog.info(0x0000, testTag, %{public}s, Ability onWindowStageDestroy);}onForeground(): void {// Ability has brought to foregroundhilog.info(0x0000, testTag, %{public}s, Ability onForeground);}onBackground(): void {// Ability has back to backgroundhilog.info(0x0000, testTag, %{public}s, Ability onBackground);} }
http://www.hkea.cn/news/14340601/

相关文章:

  • 网站做系统软件培训记录
  • 上海培训机构整顿网站页面关键词优化
  • 怎么做系统软件网站百度一下百度知道
  • 网站换空间wordpresswordpress后台图
  • 在国外做盗版电影网站吗高县住房和城乡建设部网站
  • 成都专业网站制作网站如何建设网站的目录结构层
  • 泉州有哪些做网站的项目建设成效怎么写
  • 怎么在网站里添加cnzz统计成都高端网站制作
  • 海川建设公司网站calypso wordpress
  • 建设招标网 官方网站上海网站建设推荐秒搜科技
  • 微信看视频打赏网站建设网页游戏大全电脑版在线玩
  • 帮企业建设网站和推广网站郑州做网站
  • 做网站人员有什么名称wordpress错误500
  • 站外推广营销方案电子商务公司经营范围有哪些
  • 文化馆建设网站锡盟建设工程造价管理站网站
  • html 动漫网站wordpress表excel插件
  • 建筑网站的特点手机网站主页
  • 可以发广告的100个网站手机小说网站源码
  • 商务网站建设策划书的格式响应式网站 价格
  • 免费建设网站哪个好个人网站开发教程
  • wordpress 表单 ajaxseo外贸推广
  • 网站建设在电子商务中的作用的看法百度企业推广怎么收费
  • 上海网站建设那家好大气的个人网站
  • 网站开发 ide大连有什么好玩的地方
  • 珠海网站建设哪家权威活泼的网站
  • 域名对行业网站的作用网站备案 注意
  • 苏宁网站开发人员工资谷歌chrome安卓版
  • 网站在线咨询模块成都软件开发培训机构
  • 电子商务网站建设报价表有经验的中山网站建设
  • 个人网站备案名字重要吗如何使用ps做网站