21

The default progress wheel on Android doesn't display well when the background is white, it's barely visible. How can I fix this?

Pentium10
  • 204,586
  • 122
  • 423
  • 502

3 Answers3

50

If you look at the built in styles.xml file and poke around the platform's built in drawables, it turns out the solution is pretty simple. You can use the "style" attribute to use the inverse progress bar:

<ProgressBar
    android:id="@+id/progress_bar"
    android:layout_width="40dip"
    android:layout_height="40dip"
    android:padding="6dp"
    android:indeterminate="true"
    style="?android:attr/progressBarStyleInverse"
    />
Brandon O'Rourke
  • 24,165
  • 16
  • 57
  • 58
4

Be sure if you have a white background to set the theme in your manifest to @android:style/Theme.Light. This provides resources for all of the widgets to go with a light background.

hackbod
  • 90,665
  • 16
  • 140
  • 154
2

I dont think there is way to fix this since the progressbar is sdk dependant. orange on 1.5, white on 1.6 etc... green on some devices, etc etc...

Your would have to implement/override it with your own graphics to change it.

I had the similar problem, i solved it by setting a constrasting background on the progressbar. (50% transparent black)

Here is similar issue using the horisontal progressbar implementing a custom color: How to change progress bar's progress color in Android

The circular is abit diffrent i think, but probably not impossible ;-)

Community
  • 1
  • 1
Vidar Vestnes
  • 42,644
  • 28
  • 86
  • 100