Gradient indicator color in com.google.android.material.progressindicator.CircularProgressIndicator

234 Views Asked by At

I write code for material.progressindicator.CircularProgressIndicator as below.

    <com.google.android.material.progressindicator.CircularProgressIndicator
            android:id="@+id/cpFront"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:rotation="180"
            android:progress="10"
            app:indicatorColor="@color/black"
            app:indicatorDirectionCircular="counterclockwise"
            app:indicatorSize="200dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:trackColor="#00555555"
            app:trackCornerRadius="10dp"
            app:trackThickness="60dp" />

Now, I need to set gradient color instead of black color in indicator color. Please suggest me how can to achieve this? Thanks in advance.

0

There are 0 best solutions below