trickbd

How to change android progressbar loading color!

To change progressbar loading color of android just post this 3 line of code in your xml file where progress bar is located

 

        android:indeterminate="true"
        android:indeterminateTintMode="src_atop"
        android:indeterminateTint="@color/colorAccent"

before adding this progress bar will be look like

<ProgressBar
    android:id="@+id/progressBar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_gravity="center"
    android:progressDrawable="@drawable/circular_progress_bar" />

after adding this progress bar will be look like

 

<ProgressBar
    android:id="@+id/progressBar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:indeterminate="true"
    android:indeterminateTintMode="src_atop"
    android:indeterminateTint="@color/metirial_blue"
    android:layout_gravity="center"
    android:progressDrawable="@drawable/circular_progress_bar" />

at the place of cplopr_accent add any color you want..

 

Done.. you successfully changed the progress bar color

Exit mobile version