What you need is style="@android:style/Widget.Holo.ProgressBar.Horizontal"
, not style="@android:style/Widget.ProgressBar.Horizontal
.
And, android:theme
should be set in <Activity>
tag, not in a specific view.
Hope it helps
Frage
I am having a ProgressBar
widget in my app and no matter what I do, it always shows as a fat orange one (2.x style) instead of thin blue (4.x style).
SDK version requirements are set as follows:
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="14"/>
Application theme is set to Theme.Holo
The progress bar itself is defined as follows:
<ProgressBar
android:id="@+id/progressBar1"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:theme="@android:style/Theme.Holo" />
(explicitly set theme is the latest attempt to turn it to the new style).
Is there anything I am missing?
Lösung
What you need is style="@android:style/Widget.Holo.ProgressBar.Horizontal"
, not style="@android:style/Widget.ProgressBar.Horizontal
.
And, android:theme
should be set in <Activity>
tag, not in a specific view.
Hope it helps
Andere Tipps
For the quick solution I recommend you to use a small Android library SmoothProgressBar allowing you to have a smooth and customizable horizontal indeterminate ProgressBar.
Credits: Johnkil