DevEco Studio文件释义

姚太龙
发布于 2021-7-31 18:44
浏览
1收藏

DevEco Studio文件释义

super.setUIContent(ResourceTable.Layout_ability_two):设置UI(user interface)内容

resources:所有的资源文件资源集含布局文件、媒体文件、自定义View、字体

$*:表示引用的映射

base:

element:.JSON文件,归置文字类的文件包

graphic: 自定义文件,自定义的一些view文件包

layout: xml文件,归置.XML文件的文件包

DirectionalLayout:这个是方向布局

DependentLayout:这个是依赖布局

ohos:background_element=“$media:icon”,背景元素
ohos:id=“$+id:bt_three”,$+id:表示自己的ID
ohos:height=“match_content”,match_content:内容多大自己多大;match_parent:父布局多大自己多大

ohos:width=“match_content”

media:媒体文件,归置.PNG文件的文件包

profile:

config.json:键值对形式的{key:value,key:value},一个英文类型的【】为一组类型的文件
{
“app”: {
“bundleName”: “com.guoying.oneharmonyos”,//包名:“com.guoying.oneharmonyos”
“vendor”: “guoying”,
“version”: {//版本:
“code”: 1,//版本号
“name”: “1.0”//版本名
},
“apiVersion”: {//提供的版本
“compatible”: 4,//兼容到版本:4
“target”: 5,//目标版本:5
“releaseType”: “Beta1”//发布类型:小版本
}
},
“deviceConfig”: {},//开发配置
“module”: {//模块
“package”: “com.guoying.oneharmonyos”,//模块的包名:com.guoying.oneharmonyos
“name”: “.MyApplication”,//名字:MyApplication
“deviceType”: [//开发类型:手机类
“phone”
],
“distro”: {//HAP发布的一些描述信息
“deliveryWithInstall”: true,是否可以在平台下载:是
“moduleName”: “entry”,//发布的名称:entry
“moduleType”: “entry”//类型:entry类型和feature类型中,选择entry
},
“abilities”: [//abllity的总合
{
“skills”: [//能够接受的Intent的特征
{
“entities”: [
"entity.system.home//"表示能够接收的Intent的Ability的类别
],
“actions”: [
"action.system.home//"表示能够接收的Intent的action值,
]
}
],
“orientation”: “unspecified”,//屏幕方向:未指明,可以横屏可以竖屏
“name”: “com.guoying.oneharmonyos.MainAbility”,//ability名称:com.guoying.oneharmonyos.MainAbility
“icon”: “$media:icon”,//图标:ability的图标icon
“description”: “$string:mainability_description”,//介绍:$:对这个ability的一些介绍
“label”: “$string:app_name”,//对用户显示名称:$:ability名称
“type”: “page”,//类型:页面(有三种类型可以选择page/service/data)
“launchType”: “standard”//启动类型:标准的启动类型
}
]
}
}

分类
2
收藏 1
回复
举报
回复
    相关推荐