
HarmonyOS实战专题
华为鸿蒙相关文章
愚公搬代码
《头衔》:华为云特约编辑,华为云云享专家,华为开发者专家,华为产品云测专家,CSDN博客专家,CSDN商业化专家,阿里云专家博主,阿里云签约作者,腾讯云优秀博主,腾讯云内容共创官,掘金优秀博主,亚马逊技领云博主,51CTO博客专家等。
《近期荣誉》:2022年度博客之星TOP2,2023年度博客之星TOP2,2022年华为云十佳博主,2023年华为云十佳博主,2024年华为云十佳博主等。
《博客内容》:.NET、Java、Python、Go、Node、前端、IOS、Android、鸿蒙、Linux、物联网、网络安全、大数据、人工智能、U3D游戏、小程序等相关领域知识。
展开
-
2021-08-20 HarmonyOS实战 Picker的使用
<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:alignment="center" ohos:orientation="horizontal"><Picke原创 2021-08-20 00:47:00 · 50364 阅读 · 0 评论 -
2021-08-20 HarmonyOS实战 ListContainer的使用
一:前端代码<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:alignment="center" ohos:orientation="vertical">原创 2021-08-20 00:41:29 · 50387 阅读 · 0 评论 -
2021-08-19 HarmonyOS实战 Slider的使用
<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:alignment="center" ohos:orientation="vertical"> <Ima原创 2021-08-19 22:49:11 · 50123 阅读 · 1 评论 -
2021-08-19 HarmonyOS实战 Switch的使用
<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:alignment="center" ohos:orientation="horizontal"> <原创 2021-08-19 22:40:08 · 50705 阅读 · 0 评论 -
2021-08-19 HarmonyOS实战 RadioButton的使用
<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:alignment="center" ohos:orientation="vertical"> <Ra原创 2021-08-19 01:37:59 · 49495 阅读 · 1 评论 -
2021-08-19 HarmonyOS实战 Checkbox的使用
<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:orientation="vertical"><Clock ohos:id="$+id:clock"原创 2021-08-19 01:29:07 · 49837 阅读 · 0 评论 -
2021-08-19 HarmonyOS实战 TextField 的使用
一:密码切换<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:orientation="vertical" ohos:background_element="#F2F2F2"原创 2021-08-19 01:11:22 · 49549 阅读 · 0 评论 -
2021-08-19 HarmonyOS实战 RoundProgressBar和ProgressBar的使用
一:ProgressBar<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:alignment="center" ohos:orientation="vertical">原创 2021-08-19 00:38:24 · 49536 阅读 · 1 评论 -
2021-08-19 HarmonyOS实战 TickTimer的使用
package com.example.ticktimerapplication.slice;import com.example.ticktimerapplication.ResourceTable;import ohos.aafwk.ability.AbilitySlice;import ohos.aafwk.content.Intent;import ohos.agp.components.Button;import ohos.agp.components.Component;impor原创 2021-08-19 00:17:33 · 49609 阅读 · 0 评论 -
2021-08-18 HarmonyOS实战 Clock的使用
<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:orientation="vertical"><Clock ohos:id="$+id:clock"原创 2021-08-18 23:39:20 · 49773 阅读 · 1 评论 -
2021-08-18 HarmonyOS实战 ToastDialog的使用
一:自定义使用<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:alignment="center" ohos:orientation="vertical">原创 2021-08-18 00:57:07 · 49721 阅读 · 0 评论 -
2021-08-18 HarmonyOS实战 CommonDialog的使用
一:基本使用import com.example.dialogapplication.ResourceTable;import ohos.aafwk.ability.AbilitySlice;import ohos.aafwk.content.Intent;import ohos.agp.components.Button;import ohos.agp.components.Component;import ohos.agp.window.dialog.CommonDialog;import原创 2021-08-18 00:38:47 · 49666 阅读 · 0 评论 -
2021-08-17 HarmonyOS实战 Text和Image的使用
1.xml前端页面<?xml version="1.0" encoding="UTF-8"?><DirectionalLayout ohos:orientation="vertical" ohos:alignment="center" ohos:width="match_parent" ohos:height="match_parent" xmlns:ohos="http://schemas.huawei.com/res/ohos"><Image ohos:width原创 2021-08-17 23:55:51 · 49697 阅读 · 2 评论 -
《HarmonyOS实战 — 事件案例》
一:读取文件循环显示package com.example.listenerapplication.slice;import com.example.listenerapplication.ResourceTable;import ohos.aafwk.ability.AbilitySlice;import ohos.aafwk.content.Intent;import ohos.agp.components.Button;import ohos.agp.components.Compone原创 2021-08-15 22:43:52 · 50249 阅读 · 3 评论 -
《HarmonyOS实战 — 事件》
【本文正在参与“有奖征文 | HarmonyOS征文大赛”活动】一:事件的四种写法<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:alignment="center" o原创 2021-08-15 10:40:49 · 49615 阅读 · 0 评论 -
《HarmonyOS实战 — 页面跳转案例》
【本文正在参与“有奖征文 | HarmonyOS征文大赛”活动】1.界面布局鸿蒙UI中,提供了两种编写布局的方式:在XML中声明UI布局在代码中创建布局这两种方式创建出的布局没有本质差别,但是XML方式较为方便简单,以后开发中,也都是用XML布局的方式。但是这两种方式都需要我们熟悉。所以,所以我们将通过XML的方式布局第一张页面,然后再通过代码的方式布局第二张页面。1.1 XML文件方式配置界面打开layout下面的“ability_main.xml”文件在“ability_mai原创 2021-08-11 00:56:06 · 50168 阅读 · 2 评论 -
《HarmonyOS实战 — HelloWorld案例》
1. 配置文件:config.json所有的模块,界面等信息,都会在这个文件中进行配置。鸿蒙应用启动之后,先解析config.json文件。config.json:分为三个部分:app 、deviceConfig 、moduleapp是整个项目的配置,包含了厂商信息、版本号等。deviceConfig:表示应用在设备上的配置信息。比如:是否允许应用使用网络流量、是否支持在设备未解锁状态直接启动等module:表示整个代码的配置信息。app:整个项目的配置信息内容详解:原创 2021-08-11 00:44:23 · 50517 阅读 · 2 评论