成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

HarmonyOS APP組件分享(六)

系統 OpenHarmony
文章由鴻蒙社區產出,想要了解更多內容請前往:51CTO和華為官方戰略合作共建的鴻蒙技術社區https://harmonyos.51cto.com

想了解更多內容,請訪問:

51CTO和華為官方合作共建的鴻蒙技術社區

https://harmonyos.51cto.com

HarmonyOS APP - ProgressBar體驗與分享

ProgressBar用于顯示內容或操作的進度。下面將進行對該組件簡單的操作,通過添加不同的屬性展示出不同的樣式效果。如下:

效果顯示:

布局中的代碼:

  1. <?xml version="1.0" encoding="utf-8"?> 
  2. <DirectionalLayout 
  3.     xmlns:ohos="http://schemas.huawei.com/res/ohos" 
  4.     ohos:height="match_parent" 
  5.     ohos:width="match_parent" 
  6.     ohos:orientation="vertical" 
  7.     ohos:background_element="#FF5A5858"
  8. <Text 
  9.     ohos:height="match_content" 
  10.     ohos:width="match_content" 
  11.     ohos:text="創建ProgressBar效果" 
  12.     ohos:text_size="22fp" 
  13.     ohos:text_color="red"/> 
  14.     <ProgressBar 
  15.         ohos:progress_width="10vp" 
  16.         ohos:height="60vp" 
  17.         ohos:width="800px" 
  18.         ohos:max="100" 
  19.         ohos:min="0" 
  20.         ohos:progress="60"/> 
  21.     <Text 
  22.         ohos:height="match_content" 
  23.         ohos:width="match_content" 
  24.         ohos:text="垂直ProgressBar效果。" 
  25.         ohos:text_size="22fp" 
  26.         ohos:text_color="red"/> 
  27.     <Text 
  28.         ohos:height="match_content" 
  29.         ohos:width="match_content" 
  30.         ohos:text="設置ProgressBar顏色效果。" 
  31.         ohos:text_size="22fp" 
  32.         ohos:text_color="red"/> 
  33.     <ProgressBar 
  34.         ohos:orientation="vertical" 
  35.         ohos:top_margin="20vp" 
  36.         ohos:height="150vp" 
  37.         ohos:width="60vp" 
  38.         ohos:progress_width="10vp" 
  39.         ohos:max="100" 
  40.         ohos:min="0" 
  41.         ohos:progress="60" 
  42.         ohos:background_instruct_element="#FFFFFF" 
  43.         ohos:progress_element="#FF9900"/> 
  44.     <Text 
  45.         ohos:height="match_content" 
  46.         ohos:width="match_content" 
  47.         ohos:text="添加分割線效果。" 
  48.         ohos:text_size="22fp" 
  49.         ohos:text_color="red"/> 
  50.     <ProgressBar 
  51.         ohos:progress_width="10vp" 
  52.         ohos:height="60vp" 
  53.         ohos:width="800px" 
  54.         ohos:max="100" 
  55.         ohos:min="0" 
  56.         ohos:progress="40" 
  57.         ohos:divider_lines_enabled="true" 
  58.         ohos:divider_lines_number="5"/> 
  59.     <Text 
  60.         ohos:height="match_content" 
  61.         ohos:width="match_content" 
  62.         ohos:text="設置提示文字效果。" 
  63.         ohos:text_size="22fp" 
  64.         ohos:text_color="red"/> 
  65.     <ProgressBar 
  66.         ohos:progress_width="10vp" 
  67.         ohos:height="60vp" 
  68.         ohos:width="800px" 
  69.         ohos:max="100" 
  70.         ohos:min="0" 
  71.         ohos:progress="40" 
  72.         ohos:divider_lines_enabled="true" 
  73.         ohos:divider_lines_number="5" 
  74.         ohos:progress_hint_text="40%" 
  75.         ohos:progress_hint_text_color="#FFCC99" /> 
  76. </DirectionalLayout> 

完整代碼地址:

https://gitee.com/jltfcloudcn/jump_to/tree/master/jltf_progressBar_component

HarmonyOS APP - RoundProgressBar體驗與分享

RoundProgressBar用于顯示環形進度

代碼如下:

  1. <?xml version="1.0" encoding="utf-8"?> 
  2. <DirectionalLayout 
  3.     xmlns:ohos="http://schemas.huawei.com/res/ohos" 
  4.     ohos:height="match_parent" 
  5.     ohos:width="match_parent" 
  6.     ohos:orientation="vertical" 
  7.     ohos:background_element="#FF000000"
  8.  
  9.     <DirectionalLayout 
  10.         ohos:height="0px" 
  11.         ohos:width="match_parent" 
  12.         ohos:weight="1"
  13.         <RoundProgressBar 
  14.             ohos:id="$+id:round_progress_bar" 
  15.             ohos:height="200vp" 
  16.             ohos:width="200vp" 
  17.             ohos:progress_width="10vp" 
  18.             ohos:progress="20" 
  19.             ohos:progress_color="#47CC47" 
  20.             ohos:layout_alignment="center"/> 
  21.     </DirectionalLayout> 
  22.     <DirectionalLayout 
  23.         ohos:height="0px" 
  24.         ohos:width="match_parent" 
  25.         ohos:weight="1"
  26.         <RoundProgressBar 
  27.             ohos:height="200vp" 
  28.             ohos:width="200vp" 
  29.             ohos:progress_width="10vp" 
  30.             ohos:progress="20" 
  31.             ohos:progress_color="#47CC47" 
  32.             ohos:start_angle="45" 
  33.             ohos:max_angle="270" 
  34.             ohos:progress_hint_text="加載中。。。" 
  35.             ohos:progress_hint_text_color="#007DFF" 
  36.             ohos:layout_alignment="center" /> 
  37.     </DirectionalLayout> 
  38.  
  39. </DirectionalLayout> 

完整代碼地址:

https://gitee.com/jltfcloudcn/jump_to/tree/master/jltf_RoundProgressBar_component

想了解更多內容,請訪問:

51CTO和華為官方合作共建的鴻蒙技術社區

https://harmonyos.51cto.com

 

責任編輯:jianghua 來源: 鴻蒙社區
相關推薦

2021-03-26 09:35:35

鴻蒙HarmonyOS應用開發

2021-03-17 09:35:09

鴻蒙HarmonyOS應用開發

2021-03-30 09:45:07

鴻蒙HarmonyOS應用開發

2012-04-28 21:25:58

APP

2011-03-31 14:49:35

2021-03-22 09:48:32

鴻蒙HarmonyOS應用開發

2021-03-18 09:36:02

鴻蒙HarmonyOS應用

2021-01-11 11:36:23

鴻蒙HarmonyOSApp開發

2010-07-28 12:41:18

Flex組件

2022-02-10 15:14:50

HarmonyOS操作系統鴻蒙

2013-12-16 09:36:08

App項目

2022-10-11 23:53:08

組件架構開發

2012-04-24 09:59:05

APP移動社交

2024-01-09 08:07:09

JSThreeJSCSS

2022-06-07 09:40:16

Linux應用服務器

2011-11-08 11:03:26

App Store蘋果應用推廣

2011-12-27 15:21:16

趕集團購Web App

2016-03-18 13:40:24

androidPad騰訊

2010-10-19 14:57:25

谷歌云計算

2013-01-10 12:57:23

產品經理App產品設計
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 欧美精品1区2区3区 精品国产欧美一区二区 | 麻豆亚洲 | 51ⅴ精品国产91久久久久久 | 亚洲视频精品 | 中文字幕在线一区二区三区 | 黄色大片免费看 | www.久久| 欧美福利精品 | 久久一 | 精品日韩一区二区三区av动图 | 亚洲成人午夜电影 | 久色网| 在线观看免费av网 | 国产电影精品久久 | 国产欧美日韩一区二区三区在线 | 成人在线精品视频 | 一区二区三区四区在线 | 国产不卡一区 | 福利片在线观看 | 国产精品999 | 国产极品车模吞精高潮呻吟 | 欧美999| 国产成人久久精品 | 日本免费一区二区三区视频 | 国产成人在线播放 | 综合自拍| 国产原创视频 | 涩涩视频大全 | 美女黄网 | 精品美女久久久 | 久久精品国产久精国产 | 亚洲欧洲在线视频 | 成人免费精品 | 国产一区二区三区免费观看视频 | 麻豆精品一区二区三区在线观看 | 国产一二三视频在线观看 | 欧美一区二区视频 | 久久精品欧美一区二区三区不卡 | 天天干天天谢 | 日韩国产一区二区三区 | 亚洲欧美日韩中文在线 |