IndeterminateProgressBar does not disappear #335

Closed
navarr opened this Issue Mar 6, 2012 · 2 comments

Comments

Projects
None yet
2 participants

navarr commented Mar 6, 2012

On Pre-ICS devices, using ABS 4.0, calling setProgressBarIndeterminateVisibility(Boolean.FALSE); will not cause the progress bar to disappear under certain conditions.

An example is included:

import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Window;
import android.os.Bundle;
public class IndetermianteProgressBarAsyncActivity extends SherlockActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

        setContentView(R.layout.main);
        setProgressBarIndeterminateVisibility(Boolean.TRUE);
        setProgressBarIndeterminateVisibility(Boolean.FALSE);
    }
}

It is my theory this is because they are called in quick succession, and although this does not appear to be an issue it can be when using an AsyncTask that can run long, but runs short.

Build Target: 15
minSdkVersion: 7

Owner

JakeWharton commented Mar 6, 2012

You need to be using setSupportProgressXxx for 4.0. Take a looks at the
demos sample for a full example.
On Mar 6, 2012 11:35 AM, "Navarr Barnier" <
reply@reply.github.com>
wrote:

On Pre-ICS devices, using ABS 4.0, calling
setProgressBarIndeterminateVisibility(Boolean.FALSE); will not cause the
progress bar to disappear under certain conditions.

An example is included:

import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Window;
import android.os.Bundle;

public class IndetermianteProgressBarAsyncActivity extends
SherlockActivity {
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

       setContentView(R.layout.main);
       setProgressBarIndeterminateVisibility(Boolean.TRUE);
       setProgressBarIndeterminateVisibility(Boolean.FALSE);
   }
}```

It is my theory this is because they are called in quick succession, and
although this does not appear to be an issue it can be when using an
AsyncTask that *can* run long, but runs short.

---
Reply to this email directly or view it on GitHub:
https://github.com/JakeWharton/ActionBarSherlock/issues/335

navarr commented Mar 6, 2012

My mistake @.@;

navarr closed this Mar 6, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment