2014-09-30 3 views
0

원형 진행률 막대와 그 작업 상태를 만들었지 만 왼쪽 및 오른쪽 가장자리가 잘리는 문제가 있습니다. enter image description here원형 진행률 막대 왼쪽 가장자리가 잘리지 않음

왜 그런 일이 일어나고 있는지 또는 어떻게 고쳐야할지 생각해 낼 수 없습니다. 상대 레이아웃 그

RelativeLayout의 포함 ProgressBar의

배경 및 진행에 대한
<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_above="@id/Button_searchdriver_Cancel" 
    android:layout_below="@id/searchDriver_center" 
    android:padding="3dp" 
    > 

    <ProgressBar 
    android:id="@+id/Progressbar_searchdriver_timer" 
    style="@android:style/Widget.ProgressBar.Horizontal" 
    android:layout_width="120dp" 
    android:layout_height="120dp" 
    android:layout_alignParentBottom="true" 
    android:layout_alignParentTop="true" 
    android:layout_centerInParent="true" 
    android:background="@drawable/progressbackground" 
    android:indeterminate="false" 
    android:max="60" 
    android:progressDrawable="@drawable/circularprogress" /> 


    </RelativeLayout> 

나는 다음과 같은 코드가 -

진행 당김

<?xml version="1.0" encoding="utf-8"?> 
    <rotate xmlns:android="http://schemas.android.com/apk/res/android" 
    android:fromDegrees="270" 
    android:toDegrees="270"> 
    <shape 
    android:innerRadiusRatio="2.5" 
    android:shape="ring" 
    android:thicknessRatio="7.0"> 
    <gradient 
    android:centerColor="#ffffff" 
    android:endColor="#ffffff" 
    android:startColor="#ffffff" 
    android:angle="0" 
    android:type="sweep" 
    android:useLevel="false" /> 
    </shape> 
    </rotate> 

진행 상황을 막대 배경

<?xml version="1.0" encoding="utf-8"?> 
    <shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:innerRadiusRatio="2.5" 
    android:shape="ring" 
    android:useLevel="false" 
    android:thicknessRatio="7.0"> 
    <gradient 
    android:centerColor="#000000" 
    android:endColor="#000000" 
    android:startColor="#000000" 
    android:angle="0" 
    android:type="sweep" 
    android:useLevel="false" /> 

    </shape> 

내가 뭘 잘못하고 있는지 말해 줄 수 있습니까? ??

답변

1

는 링의 내측 부분에 대한 반경 docs

innerRadiusRatio이다 따르면

android:innerRadiusRatio="3.0" 

세트 링의 폭의 비율로 나타냈다. 예를 들어, android:innerRadiusRatio="5" 인 경우 내부 반경은 반지의 폭을 5로 나눈 값과 같습니다.이 값은 android:innerRadius으로 대체 된 입니다. 기본값은 9입니다.