当前位置:网站首页>【Harmony OS】【FAQ】Hongmeng Questions Collection 1
【Harmony OS】【FAQ】Hongmeng Questions Collection 1
2022-08-03 04:32:00 【Huawei Developer Forum】
1. [ArkUI] Display Toast in eTS mode
import prompt from '@system.prompt'@[email protected] Index {build() {Column() {Row() {Button("Hello Button").fontColor(Color.White).fontSize(20).padding(20).onClick(() => {prompt.showToast({message: 'Hello,I am Toast',duration: 2000,bottom: 200})})}}.backgroundColor(Color.Black).width('100%').height('100%')}}
Show effect:
2. [DevEco Device Tool] cannot find the corresponding download link for the tool
The HarmonyOS official website cannot find the corresponding download link for the DevEco Device Tool
1. The current tool is temporarily offline and optimized. It is expected that the 3.0Beta2 version will be launched on December 30 (Thursday)
2. You can log in to this link through your account, and the DP platform-integrated development tab can be downloaded
3. [Java UI] How to debug the Hongmeng app to run to the real machine
To run the debugging application on the real machine, you need to obtain the udid first, and then add the device information in the AGC console.
The command line to get the UDID is as follows:
adb shell bm get -u
You can refer to the official website application debugging guide: Document Center
Guidelines for compiling and generating hap packages: Documentation Center
4. When developing [ArkUI]ets, how to set the minimum width or maximum width of components?
You can refer to the following API methods to set the maximum and minimum widths:
/*** constraint Size:* minWidth: minimum Width, maxWidth: maximum Width, minHeight: minimum Height, maxHeight: maximum Height,* @since 7*/constraintSize(value: {minWidth?: number | string | Resource;maxWidth?: number | string | Resource;minHeight?: number | string | Resource;maxHeight?: number | string | Resource;}): T;
The following is the ets code:
@[email protected] Second {build() {Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {Text('Hello World').fontSize(50).fontWeight(FontWeight.Bold).constraintSize({minWidth: 100,maxWidth: 200,minHeight: 100,maxHeight: 200})}.width('100%').height('100%')}}
5. [Java UI] The name of the app generated during real machine debugging is always entry_Mainability. How to customize the name?
Please modify the name and value in the resource→base→element→string.json file in the corresponding resource directory. Each language needs to be modified:
{"string": [{"name": "entry_MainAbility","value": "entry_MainAbility"}]}
For more technical articles, please visit: https://developer.huawei.com/consumer/cn/forum/topic/0203810194016170224?fid=0101587866109860105?ha_source=zzh |
边栏推荐
猜你喜欢
Test drive: project management module - curd development project
BIOTIN ALKYNE CAS:773888-45-2价格,供应商
数字化时代,企业如何建立自身的云平台与商业模式的选择?
Record some bugs encountered - when mapstruct and lombok are used at the same time, the problem of data loss when converting entity classes
redis键值出现 xacxedx00x05tx00&的解决方法
汇编题答案
【Harmony OS】【FAQ】鸿蒙问题合集1
测开:项目管理模块-项目curd开发
种草一个让程序员男友编程时,记住一辈子的 IDEA 神仙插件!
社交电商:流量红利已尽,裂变营销是最低成本的获客之道
随机推荐
Smart fitness gesture recognition: PP - TinyPose build AI virtual trainer!
【Harmony OS】【ARK UI】ETS 上下文基本操作
肖sir___面试就业课程____app
安装ambari
接口测试框架实战(一) | Requests 与接口请求构造
"Obs" start pushing flow failure: the Output. The StartStreamFailed call process
那些让电子工程师崩溃瞬间,你经历了几个呢?
肖sir__面试就业课___数据库
path development介绍
13.机器学习基础:数据预处理与特征工程
链动2+1模式简单,奖励结构丰厚,自主裂变?
接口测试框架实战(四)| 搞定 Schema 断言
Record some bugs encountered - when mapstruct and lombok are used at the same time, the problem of data loss when converting entity classes
DOM破环和两个实验的复现
【Harmony OS】【FAQ】鸿蒙问题合集1
关于#sql#的问题,如何解决?
IDEC和泉触摸屏维修HG2F-SS22V HG4F软件通信分析
索引创建、删除与使用
工程水文学知识点
超好用的画图工具推荐