显示60%时,循环进度条未显示10%的进度

时间:2017-12-07 04:20:52

标签: android xml progress-bar

我有一个循环进度条,当它显示60%时它正常工作。但它没有显示任何df.A.str.split(' v ').apply(lambda x : [y.split(' ')[0] for y in x]).apply(' v '.join) Out[198]: 0 choclate v dairy 1 ice v ka 2 cc v ee 3 iii v kkkk Name: A, dtype: object 10%的结果。sendmail -f ru@gmail.com -t sm67@gmail.com -m "testing the attachement using sendmail unix" -a AnnualReport.docx progress的帮助下显示。你能帮我吗?

我的代码是:

progress

1 个答案:

答案 0 :(得分:0)

试试这个

<RelativeLayout
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:layout_weight="1">


      <ProgressBar
           android:id="@+id/cmll_progrssbar"
           style="?android:attr/progressBarStyleHorizontal"
           android:layout_width="70dp"    
           android:layout_height="70dp"
           android:indeterminate="false"
           android:layoutDirection="rtl"
           android:max="100"
           android:progress="100"
           android:progressDrawable="@drawable/circle_progress_uncomplete" />

      <TextView
          android:id="@+id/cmll_completed_per"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignBottom="@id/cmll_progrssbar"
          android:layout_alignLeft="@id/cmll_progrssbar"
          android:layout_alignRight="@id/cmll_progrssbar"
          android:layout_alignTop="@id/cmll_progrssbar"
          android:layout_gravity="center"
          android:gravity="center"
          android:padding="10dp"
          android:text="100%" />

    </RelativeLayout>

现在像这样创建 @drawable/circle_progress_uncomplete

<?xml version="1.0" encoding="utf-8"?>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@android:id/background">
        <shape
            android:innerRadiusRatio="3"
            android:shape="ring"
            android:thicknessRatio="20.0"
            android:useLevel="false">
            <solid android:color="@color/colorLightOrange" />
        </shape>
    </item>
    <item android:id="@android:id/progress">
        <rotate
            android:fromDegrees="270"
            android:pivotX="50%"
            android:pivotY="50%"
            android:toDegrees="270">
            <shape
                android:innerRadiusRatio="3"
                android:shape="ring"
                android:thicknessRatio="20.0"
                android:useLevel="true">
                <solid android:color="@color/colorOrange" />
            </shape>
        </rotate>
    </item>

</layer-list>

输出10%进度

enter image description here

输出100%进展

enter image description here