Milestone progress does not work with ActionBarSherlock running on Gingerbread

I install ActionBarSherlock with my application and I try to use intermediate progress, I use this:

    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);    
    setSupportProgressBarIndeterminateVisibility(false);

In my onCreate and then using:

    setSupportProgressBarIndeterminateVisibility(true);

To turn it on.

It works great in ICS, but it doesn't work in Gingerbread or Froyo at all, does anyone know how to make it work? Thanks

+5
source share
4 answers

I had the same problem. The Jake solution above did not fix this for me - the undefined method.

I found a working solution posted by Jake to the error list for ActionBarSherlock:

. - , getSupportActionBar(), " ".

, onCreate():

protected void onCreate(Bundle arg0)
{
    super.onCreate(arg0);

    // allow window to show progress spinner in the action bar
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    getSupportActionBar();
    setSupportProgressBarIndeterminateVisibility(false); 
}

Laux:

, com.actionbarsherlock.view.Window.FEATURE_INDETERMINATE_PROGRESS, .

import , :

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.ActionProvider;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.view.Window;
import com.actionbarsherlock.widget.ShareActionProvider;

, - Android- , .

, , Eclipse (CTRL-SHIFT-O), Eclipse , ABS .

Glebbb .

+13

, , , , , , .

android.view.Window com.actionbarsherlock.view.Window, .

+4

supportRequestWindowFeature.

requestWindowFeature Activity .

0

Check if you are using Theme.Sherlock.NoActionBaror a similar theme for the action topic for this action. In this case, the method setSupportProgressBarIndeterminateVisibilitydoes not work for me with

Caused by: java.lang.NullPointerException
at com.actionbarsherlock.internal.ActionBarSherlockCompat.updateProgressBars(ActionBarSherlockCompat.java:710)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.onIntChanged(ActionBarSherlockCompat.java:686)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.updateInt(ActionBarSherlockCompat.java:681)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setFeatureInt(ActionBarSherlockCompat.java:665)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setProgressBarIndeterminateVisibility(ActionBarSherlockCompat.java:637)
at com.actionbarsherlock.app.SherlockFragmentActivity.setSupportProgressBarIndeterminateVisibility(SherlockFragmentActivity.java:282)

I think you should use the progress dialog to indicate the boot process or normal Themewith the activity title bar, and then use the method setProgressBarIndeterminateVisibilityfor older platforms.

-1
source

All Articles