it is a quiz app, at the end it will show the Total score, correct answer and total questions.circular progress bar is use to show correct answer out of total Questions. Problem is the green colour is moving continuously as soon as it completes the circle it again starts moving I want that it should not move.
This is Circular_done.xml
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape
android:shape="ring"
android:innerRadius="40dp"
android:thickness="10dp"
android:useLevel="false">
<solid android:color="#ffffff"></solid>
</shape>
</item>
<item android:id="@android:id/progress">
<rotate
android:fromDegrees="270"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="270">
<shape
android:innerRadius="40dp"
android:shape="ring"
android:thickness="10dp"
android:useLevel="true">
<rotate
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="360" />
<gradient
android:centerColor="#00FF00"
android:endColor="#00FF00"
android:startColor="#00FF00"
android:type="sweep" />
</shape>
</rotate>
</item>
Below is my xml code
<ProgressBar
android:id="@+id/doneProgressBar"
android:layout_width="110dp"
android:layout_height="110dp"
android:max="100"
android:layout_centerHorizontal="true"
android:layout_gravity="top"
style="?android:attr/progressBarStyleLarge"
android:indeterminateTintMode="src_in"
android:indeterminateDrawable="@drawable/circular_done" />
and my java code
final int Score = extra.getInt("SCORE");
final int totalQuestion = extra.getInt("TOTAL");
int correctAnswer = extra.getInt("CORRECT");
final String Cat=extra.getString("CAT");
txtTotalScore.setText(String.format("SCORE : %d", Score));
txtTotalQuestion.setText(String.format("PASSED : %d/%d", correctAnswer, totalQuestion));
progressBarResult.setMax(totalQuestion);
progressBarResult.setProgress(correctAnswer);