Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing indeterminate progress in Sherlock Action Bar

Tags:

i`m trying to show indeterminate progress bar in ABS v. 4.0.2 by following code

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

    setContentView(R.layout.main);

    getSherlock().setProgressBarIndeterminateVisibility(true);
}

on ICS virtual device it works fine, but progress do not shows in device with Android 2.1. what i`m doing wrong?

like image 269
Ashot Avatar asked May 10 '12 21:05

Ashot


2 Answers

Make sure you import com.actionbarsherlock.view.Window, not android.view.Window.

like image 88
Stefan Frye Avatar answered Sep 28 '22 06:09

Stefan Frye


Try setSupportProgressBarIndeterminateVisibility(boolean) to get backward compatibility.

like image 23
Jack Gao Avatar answered Sep 28 '22 05:09

Jack Gao