How to change the color of an indefinite ProgressBar?

后端 未结 7 895
萌比男神i
萌比男神i 2020-12-14 17:50

I have a progressbar with the following style: style=\"?android:attr/android:progressBarStyleSmall\"

Sadly the bar is nearly white and in my case displ

7条回答
  •  抹茶落季
    2020-12-14 18:14

    The reason why the bar is of that color is because of the style you have selected. That is a fixed style and uses the system themes for the generation of UI elements.

    Look at the source code from here. This progressBarStyleSmall attribute uses the styles defined here.

    
    

    Just create a custom style following the example from the android source code. You would need to replace the android:indeterminateDrawable to what you want.

提交回复
热议问题