How can I display a circle of tasks with round topics?

I tried to show an indefinite circle of activity, like this one:

enter image description here

Here's the layout code:

<ProgressBar android:id="@+id/progress" style="@style/GenericProgressIndicator" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_gravity="center_vertical|center_horizontal" android:visibility="gone" /> 

Here's the style code:

 <style name="GenericProgressIndicator" parent="@android:style/Widget.ProgressBar.Large"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:indeterminate">true</item> </style> 

My circle is not like the Holo circle that you see in the Gmail app or the Play app. What am I doing wrong? How can I get a nice circular activity circle Olo?

+26
java android android-progressbar
Sep 07 '12 at 10:32
source share
3 answers

It really wasn't documented anywhere, and I found it through some random article. Adding this styling attribute does the trick:

 style="?android:attr/progressBarStyleLarge" 

The only link to this in the developer documentation is here .

+50
Sep 07 '12 at 13:11
source share

Your first layout was right, but you chose the wrong style. Right:

 style="@android:style/Widget.Holo.Light.ProgressBar.Large" 
+18
Jan 4 '13 at 10:22
source share

What version of Android are you using? If you are not using the version with Holo, you will not be able to display things using the Holo style. The solution for this is to use a library such as ActionBarSherlock, which supports the Holo theme for previous versions of Android.

+1
Sep 07 '12 at 10:50
source share



All Articles