南京行业门户网站,应用程序开发,wordpress安装失败无法创建目录,防水堵漏公司做网站效果怎样鸿蒙开发深入浅出01#xff08;基本环境搭建、页面模板与TabBar#xff09; 1、效果展示2、下载 DevEco Studio3、创建项目4、新建页面模板5、更改应用信息6、新建以下页面7、Index.ets8、真机运行9、图片资源文件 1、效果展示 2、下载 DevEco Studio
访问官网根据自己的版本… 鸿蒙开发深入浅出01基本环境搭建、页面模板与TabBar 1、效果展示2、下载 DevEco Studio3、创建项目4、新建页面模板5、更改应用信息6、新建以下页面7、Index.ets8、真机运行9、图片资源文件 1、效果展示 2、下载 DevEco Studio
访问官网根据自己的版本进行下载默认安装下一步即可。
https://developer.huawei.com/consumer/cn/download/3、创建项目 4、新建页面模板 /**
* ${PROJECT_NAME} #项目的名称
* ${FILE_NAME} #文件名称
* Created by ${USER} ON ${DATE} #作者及添加日期
*/
Entry
Component
struct ${NAME} {build() {}
}5、更改应用信息
{string: [{name: module_desc,value: module description},{name: EntryAbility_desc,value: description},{name: EntryAbility_label,value: 硅谷租房 # 应用名称}]
}6、新建以下页面
Home.etsSee.etsDiscover.etsService.etsMy.ets
7、Index.ets
import Home from ./Home
import See from ./See
import Service from ./Service
import Discover from ./Discover
import My from ./MyEntry
Component
struct Index {State currentTabBarIndex: number 0;BuildertabBarBuilder(image: Resource, activeImage: Resource, text: string, index: number) {Column() {Image(this.currentTabBarIndex index ? activeImage : image).width(28).height(28)Text(text).fontSize(10).fontColor(this.currentTabBarIndex index ? #000 : #CBCBCB)}}build() {Tabs({ barPosition: BarPosition.End }) {TabContent() {Home()}.tabBar(this.tabBarBuilder($r(app.media.tabbar_home), $r(app.media.tabbar_home_active), 首页, 0))TabContent() {See()}.tabBar(this.tabBarBuilder($r(app.media.tabbar_see), $r(app.media.tabbar_see_active), 想看, 1))TabContent() {Service()}.tabBar(this.tabBarBuilder($r(app.media.tabbar_service), $r(app.media.tabbar_service_active), 服务, 2))TabContent() {Discover()}.tabBar(this.tabBarBuilder($r(app.media.tabbar_discover), $r(app.media.tabbar_discover_active), 发现, 3))TabContent() {My()}.tabBar(this.tabBarBuilder($r(app.media.tabbar_my), $r(app.media.tabbar_my_active), 我的, 4))}.barHeight(50).scrollable(false).onChange((index) {this.currentTabBarIndex index;})}
}8、真机运行 9、图片资源文件
见资源绑定