@@ -6,11 +6,62 @@ parent: Workflow
6
6
---
7
7
8
8
Work on the following IDEs:
9
+
9
10
Android Studio
10
11
{: .label .label-blue }
11
12
DevEco Studio
12
13
{: .label .label-blue }
13
14
14
15
Demo Video: [ https://www.bilibili.com/video/BV11A4m137k9/ ] ( https://www.bilibili.com/video/BV11A4m137k9/ )
15
16
16
- TODOs
17
+ ## Implementation
18
+
19
+ Select the requirement in text, select ` Auto Generate ArkUI ` .
20
+
21
+ ![ AutoDev ArkUI Sample] ( https://harmonyos-dev.github.io/aigc-harmonyos-sample/images/autodev-arkui-sample.png )
22
+
23
+ ### Text requirement
24
+
25
+ - // 生成一个经典的前端 counter
26
+ - // 生成一个聊天列表页,item 需要包含头像、昵称、最后一条聊天记录,尽可能让页面美观
27
+ - // 生成 Search 组件,可以设置placeholder文本样式和颜色、搜索框内文本样式,以及submit和onChange等方法触发时的操作。
28
+
29
+ more detail:
30
+
31
+ ``` markdown
32
+ // 音乐专辑主页
33
+ // 头部返回栏: 因元素单一、位置固定在顶部,因此适合采用自适应拉伸,充分利用顶部区域。
34
+ // 专辑封面: 使用栅格组件控制占比,在小尺寸屏幕下封面图与歌单描述在同一行。
35
+ // 歌曲列表: 使用栅格组件控制宽度,在小尺寸屏幕下宽度为屏幕的100%,中尺寸屏幕下宽度为屏幕的50%,大尺寸屏幕下宽度为屏幕的75%。
36
+ // 播放器: 采用自适应拉伸,充分使用底部区域。
37
+ ```
38
+
39
+ more detail example 2:
40
+
41
+ ``` markdown
42
+ // 生成一个:健康饮食详细页。
43
+ // 要求:使用滑动组件展示食物的详细信息,包括使用画布组件展示单位重量的食物各个营养元素的的占比,使用进度条组件展示当前食物是否为高热食物,
44
+ // 以及展示单位重量的食物所包含的热量、脂肪、蛋白质、碳水以及维他命C值;并且点击记录按钮可以弹出记录饮食的弹窗,包括记录食物的种类、重量以及用餐时间,
45
+ // 可以通过点击完成添加饮食,同时添加的饮食信息会在“记录”Tab页签做展示。
46
+ ```
47
+
48
+ ### Android Layout example
49
+
50
+ ``` xml
51
+ <?xml version =" 1.0" encoding =" utf-8" ?>
52
+ <LinearLayout xmlns : android =" http://schemas.android.com/apk/res/android"
53
+ android : layout_width =" match_parent"
54
+ android : layout_height =" match_parent"
55
+ android : orientation =" vertical" >
56
+ <TextView android : id =" @+id/text"
57
+ android : layout_width =" wrap_content"
58
+ android : layout_height =" wrap_content"
59
+ android : text =" Hello, I am a TextView" />
60
+ <Button android : id =" @+id/button"
61
+ android : layout_width =" wrap_content"
62
+ android : layout_height =" wrap_content"
63
+ android : text =" Hello, I am a Button" />
64
+ </LinearLayout >
65
+ ```
66
+
67
+ For more examples, see the [ AutoDev for HarmonyOS] ( https://harmonyos-dev.github.io/aigc-harmonyos-sample )
0 commit comments