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

国外租车网站模板如何开一家网络推广公司

国外租车网站模板,如何开一家网络推广公司,建设部规范公布网站,上海网站快速备案1、首先安装必要的开发工具 1.1通过访问https://developer.harmonyos.com/cn/develop/deveco-studio 1.2安装软件 1.3通过访问https://nodejs.org/en/download/ (注:安装Node.js按自己系统安装) 1.4安装HarmonyOS SDK 把上述都勾选中进行…

1、首先安装必要的开发工具

1.1通过访问https://developer.harmonyos.com/cn/develop/deveco-studio在这里插入图片描述
1.2安装软件
在这里插入图片描述
1.3通过访问https://nodejs.org/en/download/
(注:安装Node.js按自己系统安装)
在这里插入图片描述
1.4安装HarmonyOS SDK
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
把上述都勾选中进行安装。

2、创建一个HarmonyOS项目

在这里插入图片描述
选择EmptyAbility(选择框中的内容是,支持的设备)
在这里插入图片描述
下一步
在这里插入图片描述

3、实现最基础的页面跳转

3.1首先进入目录下的entry/src/main/resources/base/layout/下的ability_main.xml文件

<?xml version="1.0" encoding="utf-8"?>
<DirectionalLayoutxmlns:ohos="http://schemas.huawei.com/res/ohos"ohos:height="match_parent"ohos:width="match_parent"ohos:alignment="center"ohos:orientation="vertical"><Textohos:id="$+id:text_helloworld"ohos:height="match_content"ohos:width="match_content"ohos:background_element="$graphic:background_ability_main"ohos:layout_alignment="horizontal_center"ohos:text="$string:mainability_HelloWorld"ohos:text_size="40vp"/><Buttonohos:id="$+id:button1"ohos:height="match_parent"ohos:width="match_parent"ohos:layout_alignment="horizontal_center"ohos:text="跳转按钮"ohos:text_size="50vp"></Button></DirectionalLayout>

3.2然后去目录entry/src/main/java/com.example.helloword/slice/下的MainAbilitySlice文件:

package com.example.helloword.slice;import com.example.helloword.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import ohos.agp.components.Component;
import ohos.agp.components.Text;public class MainAbilitySlice extends AbilitySlice {@Overridepublic void onStart(Intent intent) {super.onStart(intent);super.setUIContent(ResourceTable.Layout_ability_main);Text text = (Text) findComponentById(ResourceTable.Id_text_helloworld);Button button = (Button) findComponentById(ResourceTable.Id_button1);/*注释:在找组件的过程中,系统会自己加上ID_,后面的部分为自己取的名字*/button.setClickedListener(listener->present(new SecondAbilitySlice(),new Intent()));}@Overridepublic void onActive() {super.onActive();}@Overridepublic void onForeground(Intent intent) {super.onForeground(intent);}
}

3.3创建一个Slice在目录entry/src/main/java/com.example.helloword/slice/下新建一个java class取名为SecondAbilitySlice
SecondAbilitySlice文件为:

package com.example.helloword.slice;import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.colors.RgbColor;
import ohos.agp.components.DependentLayout;
import ohos.agp.components.Text;
import ohos.agp.components.element.ShapeElement;
import ohos.agp.utils.Color;public class SecondAbilitySlice extends AbilitySlice {@Overrideprotected void onStart(Intent intent) {super.onStart(intent);// 声明布局DependentLayout myLayout = new DependentLayout(this);// 设置布局宽高myLayout.setWidth(DependentLayout.LayoutConfig.MATCH_PARENT);myLayout.setHeight(DependentLayout.LayoutConfig.MATCH_PARENT);// 设置布局背景为白色ShapeElement background = new ShapeElement();background.setRgbColor(new RgbColor(255, 255, 255));myLayout.setBackground(background);// 创建一个文本Text text = new Text(this);text.setText("Hi there");text.setWidth(DependentLayout.LayoutConfig.MATCH_PARENT);text.setTextSize(100);text.setTextColor(Color.BLACK);// 设置文本的布局DependentLayout.LayoutConfig textConfig = new DependentLayout.LayoutConfig(DependentLayout.LayoutConfig.MATCH_CONTENT, DependentLayout.LayoutConfig.MATCH_CONTENT);textConfig.addRule(DependentLayout.LayoutConfig.CENTER_IN_PARENT);text.setLayoutConfig(textConfig);myLayout.addComponent(text);super.setUIContent(myLayout);}
}

3.4创建一个虚拟机
在这里插入图片描述
此处需要登陆,需要拥有开发者账号

选择手机(phone)

运行那个小三角小三角就好了

4、结语

好的开始是成功的一大步!

http://www.yayakq.cn/news/914935/

相关文章:

  • 四川省建设厅门户网站网站服务器费用明细
  • 爱最好网站建设2018网站内容和备案
  • 佛山网站建设灵格网络安全工程师报名官网
  • 南宁经典网站建设微信推广平台收费标准
  • 万网 公司网站链接WordPress连接不上FTP
  • 做网站的公司合肥wordpress类目
  • 网站板块的策划方案历下网站建设
  • 做电信宽带合适做网站吗软文案例200字
  • 做火情监控网站需要用什么系统哈尔滨公众号制作
  • 遂平网站建设网站建设最新流行
  • 网站手机版方案wordpress版本查看
  • 俄罗斯女孩制作论文网站成全视频免费观看在线看动画
  • 免费虚拟主机网站源码连云港百度总代理
  • 南宁百度网站推广网站建设思维导图模板
  • 大型网站开发实例庆阳门户
  • 做网站要钱嘛网络运营怎么学
  • 重庆做网站letide成都包装设计公司哪家好
  • wordpress创建多站点代做百度首页排名价格
  • 哪些网站可以接任务做兼职济南建设招标网
  • 做企业网站的人才公司要招个做网站的人
  • 做360全景有什么网站电商平台运营公司
  • 团购网站建设北京网络推广有哪些公司
  • 庆阳网站设计师招聘wap浏览器网页版
  • 外贸网站建设内容包括哪些wordpress主题视频
  • 学会网站制作要多久网站建设什么打王思聪
  • 吉安网站设计怎样让自己做的网站被百度收录
  • 营销网站建设818gx怎么样可以做自己的网站
  • 济南企业网站开发百度云虚拟主机上传wordpress
  • 垣宝建设工程集团网站wordpress文章不显示图片
  • 好看的wordpress模版wordpress优化加速缓存中国