views:

457

answers:

3

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

+1  A: 

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: http://stackoverflow.com/questions/2020882/how-to-change-progress-bars-progress-color-in-android

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

PHP_Jedi
+5  A: 

I spent many many hours trying to figure this same problem out. After looking at the built in styles.xml and poking 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
A: 

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