成人免费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-17 09:35:09

鴻蒙HarmonyOS應用開發

2021-03-30 09:45:07

鴻蒙HarmonyOS應用開發

2021-03-26 09:35:35

鴻蒙HarmonyOS應用開發

2021-03-18 09:36:02

鴻蒙HarmonyOS應用

2012-04-28 21:25:58

APP

2021-03-22 09:48:32

鴻蒙HarmonyOS應用開發

2011-03-31 14:49:35

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

組件架構開發

2021-01-14 09:50:26

鴻蒙HarmonyOSAPP

2024-01-09 08:07:09

JSThreeJSCSS

2022-06-07 09:40:16

Linux應用服務器

2012-04-24 09:59:05

APP移動社交

2013-01-10 12:57:23

產品經理App產品設計

2013-04-28 13:52:05

app

2015-03-24 20:07:18

APP推廣APP運營

2011-11-08 11:03:26

App Store蘋果應用推廣
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 青青久视频 | 古典武侠第一页久久777 | 日韩成人 | 99久久精品免费看国产四区 | 国产精品伦理一区二区三区 | 欧美精品综合在线 | 精品视频在线一区 | 日韩综合 | 美女视频一区 | 免费在线观看黄视频 | 久久久久久国产精品 | 久久成人免费 | 亚洲久久一区 | 日韩福利 | 亚洲播放一区 | 欧美福利专区 | 亚洲一区二区中文字幕在线观看 | 国产综合精品一区二区三区 | 国产精品久久国产精品99 | 中文字幕精品一区 | 99精品国产一区二区三区 | 国产一极毛片 | 午夜视频一区二区 | 久久久久国产精品 | 欧美中文字幕一区二区 | 欧美性高潮 | 熟女毛片 | 亚洲欧美激情精品一区二区 | 狠狠爱免费视频 | 精品一区在线 | 91免费小视频 | 亚洲成人精品国产 | 国产高清视频在线观看播放 | www.玖玖玖 | 国产成人黄色 | 久久成人精品视频 | 欧美视频精品 | 国产在线资源 | 国产一区精品 | 怡红院成人在线视频 | 亚洲精品一区在线观看 |