偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

HarmonyOS APP組件分享(六)

系統(tǒng) OpenHarmony
文章由鴻蒙社區(qū)產(chǎn)出,想要了解更多內(nèi)容請前往:51CTO和華為官方戰(zhàn)略合作共建的鴻蒙技術(shù)社區(qū)https://harmonyos.51cto.com

想了解更多內(nèi)容,請訪問:

51CTO和華為官方合作共建的鴻蒙技術(shù)社區(qū)

https://harmonyos.51cto.com

HarmonyOS APP - ProgressBar體驗與分享

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

效果顯示:

布局中的代碼:

  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="創(chuàng)建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用于顯示環(huán)形進度

代碼如下:

  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

想了解更多內(nèi)容,請訪問:

51CTO和華為官方合作共建的鴻蒙技術(shù)社區(qū)

https://harmonyos.51cto.com

 

責任編輯:jianghua 來源: 鴻蒙社區(qū)
相關(guān)推薦

2021-03-26 09:35:35

鴻蒙HarmonyOS應用開發(fā)

2021-03-17 09:35:09

鴻蒙HarmonyOS應用開發(fā)

2021-03-30 09:45:07

鴻蒙HarmonyOS應用開發(fā)

2012-04-28 21:25:58

APP

2011-03-31 14:49:35

2021-03-22 09:48:32

鴻蒙HarmonyOS應用開發(fā)

2021-03-18 09:36:02

鴻蒙HarmonyOS應用

2021-01-11 11:36:23

鴻蒙HarmonyOSApp開發(fā)

2010-07-28 12:41:18

Flex組件

2022-02-10 15:14:50

HarmonyOS操作系統(tǒng)鴻蒙

2013-12-16 09:36:08

App項目

2022-10-11 23:53:08

組件架構(gòu)開發(fā)

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

產(chǎn)品經(jīng)理App產(chǎn)品設計
點贊
收藏

51CTO技術(shù)棧公眾號