Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActionBar Sherlock Progressbar not showing on 3.1 but on 4.0+

looks like i have a smaller Problem but cant find why. In my SherlockFragmentActivity onCreate i do the following:

@Override
public void onCreate(final Bundle savedInstanceState)
{
    requestWindowFeature(Window.FEATURE_PROGRESS);
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    super.onCreate(savedInstanceState);

The AndroidManifest.xml

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

In an Fragment which loads some Data i do a simple:

    getSherlockActivity().setSupportProgressBarIndeterminateVisibility(true);

All working great on ICS, but same code running on my 3.1 Tablet never show an ProgressBar when requested. Anyone can give me an hint why this happen ?

I also have the problem in the Emulator running 2.2, no Progress ever shown. I looked again into FeatureToggles from the Sherlock Samples, same code, different result :/

PS: Using 4.01 of ActionBar Sherlock

like image 1000
Kitesurfer Avatar asked Apr 21 '12 15:04

Kitesurfer


1 Answers

Make sure you are using the com.actionbarsherlock.view.Window import instead of android.view.Window.

If you miss this import change the progress method calls will only ever work on ICS and newer devices.

like image 111
Jake Wharton Avatar answered Nov 08 '22 22:11

Jake Wharton