Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Indeterminate Progress Bar not animated

I want a infinite progress bar like here under Activity Indicatior, Activity bar

http://www.google.de/imgres?um=1&hl=de&client=firefox-a&hs=H9I&tbo=d&rls=org.mozilla:de:official&biw=1280&bih=697&tbm=isch&tbnid=AX0X8So5n4iiPM:&imgrefurl=http://developer.android.com/design/building-blocks/progress.html&docid=8Hr06JHpY9T3rM&imgurl=http://developer.android.com/design/media/progress_download.png&w=760&h=348&ei=bDDgULSzELL64QTa74DgBg&zoom=1&iact=rc&dur=318&sig=116802181569187224100&page=2&tbnh=143&tbnw=265&start=35&ndsp=40&ved=1t:429,r:51,s:0,i:243&tx=131&ty=39

My implementation is not animated and not spinning. What is wrong? Thanks

<ProgressBar
    android:id="@+id/progressBar"
    style="?android:attr/progressBarStyleHorizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />
like image 927
user1324936 Avatar asked Dec 30 '12 12:12

user1324936


2 Answers

Add android:indeterminate="true" to your xml - that should fix it.

like image 124
Darwind Avatar answered Nov 15 '22 13:11

Darwind


here's my xml, it works fine:

<ProgressBar
    android:id="@+id/progressBar1"
    style="?android:attr/progressBarStyleLarge"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true" />
like image 41
Wops Avatar answered Nov 15 '22 11:11

Wops