Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default color change in ContentLoadingProgressBar

I am using androidx in my project and somewhere i am using ContentLoadingProgressBar but i am not able to change default color.

I have tried with android:indeterminateTint but can't help.

If anyone having any idea regarding this plz suggest

<androidx.core.widget.ContentLoadingProgressBar
                android:id="@+id/progress"
                android:layout_width="@dimen/_30sdp"
                android:layout_height="@dimen/_30sdp"
                android:indeterminateTint="@android:color/white"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
like image 957
Mohit Suthar Avatar asked Oct 25 '25 04:10

Mohit Suthar


1 Answers

Extend the default theme and override colorAccent

<style name="AppTheme.WhiteAccent">
    <item name="colorAccent">@color/white</item> <!-- Whatever color you want-->
</style>

add ContentLoadingProgressBar the android:theme attribute:

android:theme="@style/AppTheme.WhiteAccent"
like image 198
Sultan Mahmud Avatar answered Oct 27 '25 18:10

Sultan Mahmud