2017-12-07 3 views
-1

순환 진행 표시 줄이 있으며 60 %로 표시되면 제대로 작동합니다. 그러나 10 % 결과에 대해서는 progress을 표시하지 않습니다. progressadapter의 도움으로 표시됩니다. 저를 도와주세요?순환 진행률 막대가 60 %로 표시 될 때 10 %의 진행률을 표시하지 않습니다.

내 코드는 다음과 같습니다

<ProgressBar 
    android:id="@+id/progressbar" 
    style="?android:attr/progressBarStyleHorizontal" 
    android:layout_width="100dp" 
    android:layout_height="100dp" 
    android:layout_marginTop="10dp" 
    android:max="100" 
    android:indeterminate="false" 
    android:progressBackgroundTint="#D3D3D3" 
    android:progress="50" 
    android:progressDrawable="@drawable/progressbar" 
    android:layout_centerVertical="true" /> 
+0

주 당신의 **'드로어 블/사진 progressbar' ** –

+0

당신이 progree은 내가 볼 –

+0

자바 코드를 의미합니다 설정 곳에서 코드를 넣어 안드로이드 : 코드에서 진행률이 50으로 설정되면 50 % 완료됩니다. 10 % 미만으로 설정하여 10 % 결과를 표시 할 수 있습니다. – Chithra

답변

0

지금이

<?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> 

OUTPUT 10 %의 진행과 같은 @drawable/circle_progress_uncomplete 작성이

<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> 

을 시도

enter image description here

100 % 진행 OUTPUT

enter image description here

+1

고맙습니다. 신의 축복이 있습니다. – bini

+0

@bini 귀하를 도와 드리겠습니다. – Prem

관련 문제