I would like to put a progressBar on the action bar but setting
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVi
You'll need to create your own style to apply to the ActionBar. There's a great tutorial on this on the Android Developers Blog. To style the intermediate progress bar, try using indeterminateProgressStyle
and Widget.ProgressBar.Small
. Here's a quick example.
<style name="YourTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/ActionBarIPS</item>
</style>
<style name="IndeterminateProgress" parent="@android:style/Widget.ProgressBar">
<item name="android:indeterminateDrawable">@drawable/ic_launcher</item>
</style>
<style name="ActionBarIPS" parent="@android:style/Widget.ActionBar">
<item name="android:indeterminateProgressStyle">@style/IndeterminateProgress</item>
<item name="android:background">@color/white</item>
</style>