I would like to put a progressBar on the action bar but setting
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVisibility(true);
on onCreate
method produces a medium size progressBar (48dip x 48dip) I guess. I want to change the size of the progressBar but I cannot find how to do it. Can you help me please?
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
withandroid:Theme.Holo.Light
etc.3) Edit
AndroidManifest.xml
.your
<application>
must containandroid:theme="@style/myTheme"
so that the application is using your override styles fromstyles.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.