Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/191.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android-带有圆形尖端的ProgressBar圆_Android_Progress Bar - Fatal编程技术网

Android-带有圆形尖端的ProgressBar圆

Android-带有圆形尖端的ProgressBar圆,android,progress-bar,Android,Progress Bar,我知道你必须用画布完成OnDraw绘图,但我尝试使用Android ProgresBar,而不是圆角,在形状中使用了角,但没有任何效果 数据如下: <ProgressBar android:id="@+id/progress_bar_circle" android:layout_width="272dp" android:layout_height="272dp" android:indeterminateOnly="false" android:p

我知道你必须用画布完成OnDraw绘图,但我尝试使用Android ProgresBar,而不是圆角,在形状中使用了角,但没有任何效果

数据如下:

<ProgressBar
    android:id="@+id/progress_bar_circle"
    android:layout_width="272dp"
    android:layout_height="272dp"
    android:indeterminateOnly="false"
    android:progressDrawable="@drawable/animation_center_progress"
    android:background="@drawable/animation_ring_center"
    android:layout_centerInParent="true"
    android:fadingEdge="horizontal"
    android:max="100"
    android:progress="80"
    style="?android:attr/progressBarStyleHorizontal"/>

动画中心进展

<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="270"
android:toDegrees="270">
<shape
    android:innerRadiusRatio="2.4"
    android:shape="ring"
    android:thickness="12dp"
    android:useLevel="true">

    <solid
        android:color="#FFFF8D"/>
</shape>

动画·环·中心

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="ring"
android:innerRadiusRatio="2.4"
android:thickness="12dp"
android:useLevel="false">
<solid
    android:color="#26000000"/>