I would like to put a progressBar on the action bar but setting
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVi
I struggled with all of these solutions because I was not using actionbarsherlock
. I leveraged off Vlasto Benny Lava's answer, which didn't work for me initially.
Here is what I did step by step:
1) open your styles.xml file, it should be under /res/values/styles.xml
. If it doesn't exist create it.
2) paste in:
One catchya I came across, you cannot use a theme name of "AppTheme" otherwise the overrides will not work. I used "MyTheme". This theme is using Holo so it has a black ActionBar as seen in image below. If you wish to have a white coloured actionbar then of course replace android:Theme.Holo
with android:Theme.Holo.Light
etc.
3) Edit AndroidManifest.xml
.
your
must contain android:theme="@style/myTheme"
so that the application is using your override styles from styles.xml
ie, my manifest application tag file looks something like this:
Because your simply shrinking down the size of the existing progress png there is no need to export any images and move them to your drawable location etc.
Here's what mine looks like, the size of the icon is perfect for me.