Reputation: 11608
I added a ProgressBar
to my UI by using the ADT's visual editor. For some reason, the ProgressBar
is not in Holo style used by my Activity
, it's just a grey line thought it is supposed to be in Holo style. As you can see below, I didn't touch any ProgressBar
's attributes in Activity's style:
<style name="sMain" parent="@android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/mTabAreaBackground</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle</item>
</style>
The Bar's XML:
<ProgressBar
android:id="@+id/pbMyBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/relativeLayout1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" />
Any explanation for this strange behavior?
Upvotes: 0
Views: 2701
Reputation: 8016
A gray line is Holo style -- it just doesn't have any progress. Try setting android:progress="50"
and you'll see half of it fill up with blue.
And just to reiterate, setting style="?android:attr/progressBarStyleHorizontal"
is what you need to do to get 'holo style'.
Upvotes: 1