<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Android CircleProgressBar實(shí)線和虛線進(jìn)度條控件

          聯(lián)合創(chuàng)作 · 2023-09-24 08:37

          CircleProgressBar繼承ProgressBar, 是包含實(shí)心和線條兩種風(fēng)格的圓環(huán)進(jìn)度條. 此外, 進(jìn)度值可以隨意定制. 如果你對(duì)酷炫的進(jìn)度條比較感興趣, 或許你更喜歡 LoadingDrawable.

          用法

          Gradle

           dependencies {
              compile 'com.dinuscxj:circleprogressbar:1.0.0'
           }

          用在xml中:

          <com.dinuscxj.progressbar.CircleProgressBar    
              android:id="@+id/line_progress"
              android:layout_marginTop="@dimen/default_margin"
              android:layout_width="50dp"
              android:layout_height="50dp" />

          屬性

          有下面這些屬性你可以設(shè)置:

          The style:

          • solid

          • line

          The progress text:

          • text color

          • text size

          • visibility

          • format

          The progress circle:

          • width

          • color

          • background color

          The line style:

          • width

          • count

          例如:

          <com.dinuscxj.progressbar.CircleProgressBar    
              android:layout_width="50dp"
              android:layout_height="50dp"
          
              app:style="line"
          
              app:progress_text_color="@color/holo_purple"
              app:progress_text_size="@dimen/progress_text_size"
              app:draw_progress_text="true"
              app:progress_text_format_pattern="@string/progress_text_format_pattern"
          
              app:progress_stroke_width="1dp"
              app:progress_color="@color/holo_purple"
              app:progress_background_color="@color/holo_darker_gray"
          
              app:line_width="4dp"
              app:line_count="30"/>

          優(yōu)點(diǎn)

          1. 繼承ProgressBar, 不必關(guān)心當(dāng)前進(jìn)度狀態(tài)的保存, ProgressBar 已經(jīng)在onSaveInstanceState()和 onRestoreInstanceState(Parcelable state)中幫我們寫好了。

          2. 定制性很強(qiáng),可以設(shè)置兩種風(fēng)格的進(jìn)度條,設(shè)置進(jìn)度條的顏色和進(jìn)度文本的顏色和大小, 由于代碼中對(duì)于進(jìn)度文本的格化化是使用的String.format(), 所以進(jìn)度文本可以根據(jù)需要隨意定制

          3. 代碼優(yōu)雅,代碼注釋很全面,格式整齊,可以直接在xml中設(shè)置相關(guān)的屬性。

          瀏覽 18
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  亚洲伦理精品 | 天天日天天干天天插 | 蜜桃视频网站免费观看 | 亚洲人妻A V | 欧美精品成人一区二区三区四区 |