I thought that I could put a ProgressBar instance in my xml, set it to be indeterminate, give it a max and a value, and be done. However, it wasn't nearly that easy. After a few hours of hunting on Google and the Android Groups, I stumbled upon the solution in an online preview of The Busy Coder's Guide to Android Development. In short, I had to set the following on my ProgressBar's XML:
style="?android:attr/progressBarStyleHorizontal"
WTF?
" http://bytecrafter.blogspot.com/2008/12/using-horizontal-progress-bar-in.html
to get horizontal progressbar just put
<ProgressBar
android:id="@+id/ProgressBar01"
android:indeterminateOnly="false"
android:progressDrawable="@android:drawable/progress_horizontal"
android:indeterminateDrawable="@android:drawable/progress_indeterminate_horizontal"
android:minHeight="20dip"
android:maxHeight="20dip" android:layout_width="fill_parent"></ProgressBar>
into your \res\layout\main.xml
YOU SAVED MY SANITY
ReplyDeleteIt really Helped me.Thank U.
ReplyDeletecan we use image to show the progress, instead of using colours ??
ReplyDeleteHello, i think that i saw you visited my web site so i came to
ReplyDelete“return the favor”.I'm trying to find things to improve my site!I suppose its ok to use a few of your ideas!!