Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a black progress bar to be visible on a white background?

Tags:

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

like image 797
Pentium10 Avatar asked May 14 '10 17:05

Pentium10


2 Answers

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"     /> 
like image 190
Brandon O'Rourke Avatar answered Sep 30 '22 16:09

Brandon O'Rourke


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.

like image 20
hackbod Avatar answered Sep 30 '22 18:09

hackbod