What's the best way to create an indeterminate, horizontal progress bar? If i do this,
dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
dialog.setIndeterminate(true);
I still get the progress numbers (percent, etc) along the bottom. On ICS, I can do this,
dialog.setProgressNumberFormat("");
dialog.setProgressPercentFormat(new NumberFormat() {
@Override
public StringBuffer format(double value, StringBuffer buffer, FieldPosition field) {
return new StringBuffer();
}
@Override
public StringBuffer format(long value, StringBuffer buffer, FieldPosition field) {
return new StringBuffer();
}
@Override
public Number parse(String string, ParsePosition position) {
return 0;
}
});
to get rid of the numbers at the bottom, but those two methods are only available on ICS.
? Thanks
Here we go - I just found it. :) android:indeterminateOnly="true" is the key.
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleHorizontal"
android:indeterminateOnly="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />