我想创建一个Circluar Determinate ProgressBar,它显示了Bar中心的Progress.是否有任何默认方式来创建它,或者我将创建自己的自定义方法.
有没有人知道如何使视图反转,我有一个水平ProgressBar我希望它从右到左而不是从左到右
我有一个自定义循环进度条.这是我可以确定的可绘制的:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/secondaryProgress">
<shape
android:innerRadiusRatio="6"
android:shape="ring"
android:thicknessRatio="20.0"
android:useLevel="true">
<gradient
android:centerColor="#999999"
android:endColor="#999999"
android:startColor="#999999"
android:type="sweep" />
</shape>
</item>
<item android:id="@android:id/progress">
<rotate
android:fromDegrees="270"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="270">
<shape
android:innerRadiusRatio="6"
android:shape="ring"
android:thicknessRatio="20.0"
android:useLevel="true">
<rotate
android:fromDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="0" />
<gradient
android:centerColor="?attr/colorAccent"
android:endColor="?attr/colorAccent"
android:startColor="?attr/colorAccent"
android:type="sweep" />
</shape>
</rotate>
</item>
</layer-list>
Run Code Online (Sandbox Code Playgroud)
我希望它以顺时针方向显示进度,但现在它显示逆时针方向.
我该如何改变它?