I setup ActionBarSherlock with my app, and I’m trying to use the Intermediate Progress, I’m using this:
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setSupportProgressBarIndeterminateVisibility(false);
In my onCreate, and then using:
setSupportProgressBarIndeterminateVisibility(true);
To enable it.
It works fine in ICS but it doesn’t work at all in Gingerbread or Froyo, does anyone know how to get it to work? Thanks
I just had the same problem. Jake’s solution above did not fix it for me – the method is undefined.
I found a working solution posted by Jake on the bug list for ActionBarSherlock here:
See Jake’s response to the poster – the trick is to call
getSupportActionBar()first, to “trigger creation of the views”.So my
onCreate()method is:Update based on comment from Laux:
Make sure your imports reflect
com.actionbarsherlock.view.Window.FEATURE_INDETERMINATE_PROGRESSfor this to work.Here is part of my
importblock from an app that uses this pattern:This is a very good thing to remember when working with ABS – many of your normal Android imports should be updated to refer to ABS instead.
It may be a good idea to revisit your import block, or possibly remove it entirely and let Eclipse rebuild it for you (CTRL-SHIFT-O) to which point Eclipse will prompt you for each import that ABS redeclares.
This was also explained by Glebbb in his answer.