Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add indeterminate horizontal progress to Action Bar

I need to add a indeterminate horizontal progress to action bar. I try using:

setSupportProgressBarIndeterminateVisibility(false);

but I get a spinning wheel progress widget and not a indefinite one horisntal. Thanks

like image 589
user1796624 Avatar asked Sep 10 '13 09:09

user1796624


2 Answers

Chris Banes made a great library "ActionBar-PullToRefresh" : https://github.com/chrisbanes/ActionBar-PullToRefresh

in which he add an other great library : SmoothProgressBar : https://github.com/castorflex/SmoothProgressBar

The ActionBar-PullToRefresh library allow you to add a horizontal indeterminate progress bar to your ActionBar.

You can either use this library or look at is implementation to do it yourself.

like image 151
Andros Avatar answered Nov 14 '22 17:11

Andros


Instead of using requestWindowFeature(Window.FEATURE_PROGRESS) try using requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS)

then enable with these:

setProgressBarIndeterminate(true);
setProgressBarVisibility(true);

I haven't tried it with the support class, but I guess it should work the same.

like image 45
Gabor Juhasz Avatar answered Nov 14 '22 18:11

Gabor Juhasz