HarmonyOS设计文档中,为大家提供了独特的流转图标,开发者可以根据需要直接引用。 开发者直接使用官方提供的流转图标内容,既可以符合HarmonyOS原生应用的开发
2023-10-26 10:25
HarmonyOS设计文档中,为大家提供了独特的华为分享图标,开发者可以根据需要直接引用。 开发者直接使用官方提供的华为分享图标内容,既可以符合HarmonyOS原生应
2023-10-25 14:28
HarmonyOS设计文档中,为大家提供了独特的图标库,开发者可以根据需要直接引用。 图标库可以分为双色图标、填充图标、
2023-10-27 16:40
HarmonyOS设计文档中,为大家提供了独特的元服务图标,开发者可以根据需要直接引用。 开发者直接使用官方提供的元服务图标内容,既可以符合HarmonyOS原生应用的
2023-11-01 16:55
OpenHarmony,也就是OpenHarmony。全球感兴趣的企业还有个人都能够参加。下面小编为大家带来openharmony开源图标。 30个HarmonyOS通用填充类图标:
2021-06-22 11:28
征文#鸿蒙卡片-物联网DTU污水液位计卡片查看详情:https://bbs.elecfans.com/jishu_2106011_1_1.html5、HarmonyOSAPP开发-JS时钟练习尝试查看详情:https://bbs.elecfans.com/jishu_2104144_1_1.html
2021-06-29 11:30
一、技术相关项目名称:jltf-SettingsAbilitty项目语言:js体验模板: SettingsAbilitty工具:deveco studio二、效果如下:三、开发体验过程第一步 建立项目新建一个js的应用项目,直接点击next进行下一步第二步修改部分代码主要部分:Hml部分 {{ title }} {{ list_group.value }} {{ list_group.value }} {{ tv_img_text }} Css部分.all { flex-direction: column; background-color: #f1f3f5;}.list_container { flex-direction: column;}.container_tv { display: none;}.content { justify-content: center;}@MEDIA screen and (device-type: tv) { .bar_container {display: none; } .title_container {width: 100%;text-align: left;margin: 24px 45px;height: 100px; } .title {font-weight: bold;font-size: 45px; } /** left */ .list_container {display: none; } .container_tv {display: flex;flex-direction: column;background-image: url("/common/Wallpaper.png"); } .list_tv_container {width: 100%; } .list_tv {margin-left: 24px; } .wearable_item {display: none; } .content_tv {height: 48px;background-color: #33f1f3f5;border-radius: 12px;margin: 6px 0;padding-left: 12px; } .content_tv_text {font-size: 18px;color: #E5FFFFFF; } /** right */ .content_img {flex-direction: column;justify-content: flex-start;align-items: center; } .img_box {margin-top: 76px;background-color: #808080;width: 180px;height: 180px; } .img_img {object-fit: contain;width: 180px;height: 180px; } .text_box {width: 100%;margin-top: 20px;justify-content: center; } .img_text {width: 280px;font-size: 18px;color: #99FFFFFF;text-align: center; }}@media screen and (device-type: wearable) { .bar_container {display: none; } .title_container {justify-content: center;height: 20%; } .title {font-size: 19px;font-weight: bold; } .content_img {display: none; } .list_container {display: none; } .container_tv {display: flex;flex-direction: column;background-color: black; } .list_tv_container {width: 100%;justify-content: center; } .list_tv {width: 90%; } .sub_item {justify-content: center;align-items: center; } .content_tv {justify-content: center; } .content_tv_text {display: none; } .wearable_item {flex-direction: column;align-items: center;justify-content: center; } .wearable_item_img {height: 5px; } .wearable_item_text {height: 48px;padding-bottom: 6px;justify-content: center; } .wearable_item_text_content {font-size: 19px;text-align: center; }}Js部分:const TAG = '[fragment_main]';export default { data: {title: "",array: [[1, 0], [1, 1], [1, 2], [2, 2], [2, 2], [2, 3], [3, 3], [3, 5]],list: [],tv_img_add: "common/profile.png",tv_img_text: "",file_data: [{ "image_add": "common/profile.png",},{ "image_add": "common/ic.png",},{ "image_add": "common/more.png",},{ "image_add": "common/add64.png",},{ "image_add": "common/add64.png",},{ "image_add": "common/add64.png",},{ "image_add": "common/add64.png",},{ "image_add": "common/add64.png",}] }, onInit() {this.title = this.$t('strings.title');this.list = [];this.tv_img_text = this.$t('strings.img_text_0');var str = 'strings.Setting';for (var i = 0; i < this.array.length; i++) {var resource = str + i;var dataItem = { value: this.$t(resource)};this.list.push(dataItem);} }, changeList($idx) {console.log(TAG + $idx);this.tv_img_add = this.file_data[$idx].image_add;this.tv_img_text = this.$t('strings.img_text_' + $idx);this.$element($idx).focus({focus: true}); }}第三步登录你的账号然后启动模拟器即可实现效果完整代码地址:https://gitee.com/jltfcloudcn/jump_to/tree/master/SettingsAbility附件:
2021-08-09 09:40
`显示效果: 上下拖动改变选中的值 布局中的代码:<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:orientation="vertical"> <TimePickerohos:id="$+id:time_picker"ohos:height="match_parent"ohos:width="match_parent"ohos:normal_text_color="#007DFF"ohos:normal_text_size="25fp"ohos:operated_text_color="#FF9912"ohos:shader_color="#00BFFF"/></DirectionalLayout>Slice文件中package com.example.jltftiyan5.slice;import com.example.jltftiyan5.ResourceTable;import ohos.aafwk.ability.AbilitySlice;import ohos.aafwk.content.Intent;import ohos.agp.components.TimePicker;public class MainAbilitySlice extends AbilitySlice { @Override public void onStart(Intent intent) {super.onStart(intent);super.setUIContent(ResourceTable.Layout_ability_main);TimePicker timePicker = (TimePicker) findComponentById(ResourceTable.Id_time_picker);int hour = timePicker.getHour();int minute = timePicker.getMinute();int second = timePicker.getSecond();timePicker.setHour(19);timePicker.setMinute(18);timePicker.setSecond(12);timePicker.setTimeChangedListener(new TimePicker.TimeChangedListener() {@Overridepublic void onTimeChanged(TimePicker timePicker, int hour, int minute, int second) {}}); } @Override public void onActive() {super.onActive(); } @Override public void onForeground(Intent intent) {super.onForeground(intent); }}完整代码下载地址:https://gitee.com/jltfcloudcn/jump_to/tree/master/jltf_TimePicker_component`
2021-03-20 12:26
1.图标原子化服务图标与传统的APP桌面应用图标有明显区别,它继承了 HarmonyOS 的设计语言体系,内部圆形表示完整独立,外圈装饰线表示可分可合可流转的特点。原子
2022-02-09 10:42
`Switch是切换单个设置开/关两种状态的组件。我们体验效果如下。显示效果: 滑动按钮 代码如下:布局中<?xml version="1.0" encoding="utf-8"?><DirectionalLayout xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height="match_parent" ohos:width="match_parent" ohos:orientation="vertical"> <Switchohos:id="$+id:btn_switch"ohos:height="30vp"ohos:width="60vp"ohos:top_margin="40px"ohos:left_margin="400px"ohos:text_state_off="OFF"ohos:text_state_on="ON"/></DirectionalLayout> 完整源码地址:https://gitee.com/jltfcloudcn/jump_to/tree/master/jltf_switch_component`
2021-03-24 10:12