I'm displaying an horizontal progress bar in my action bar. My problem is the progress bar width is not the action bar width, but smaller (but centered). Is that a normal behavior? How can I give it the screen width?
I'm using this in onCreate
requestWindowFeature(Window.FEATURE_PROGRESS);
and this in my methods
public void setShowIndeterminateProgress(boolean val) {
setProgressBarIndeterminate(true);
setProgressBarVisibility(val);
}
Thanks in advance.
There is an attribute android:progressBarPadding
in the action bar style. Set it to 0dip
.
<style name="MyActionBar" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:progressBarPadding">0dip</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With