Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Padding menu items in action bar sherlock [duplicate]

I'm having action bar which Title Name, Search and Action Overflow menu item, though i'm using ActionBarSherlock library for this. I want to remove padding for search and Action Overflow menu item in action bar.

like image 552
RajeshVijayakumar Avatar asked Oct 04 '12 04:10

RajeshVijayakumar


1 Answers

Check this link:

ActionBarSherlock - How to set the padding of each actionbar's icon?

The idea is to create a new theme which has a parent theme as Theme.Sherlock

and lower actionButtonStyle minWidth attribute

<style name="MyTheme" parent="Theme.Sherlock">
    <item name="actionButtonStyle">@style/MyActionButtonStyle</item>
</style>

<style name="MyActionButtonStyle" parent="Widget.Sherlock.ActionButton">
    <item name="android:minWidth">28dip</item>
</style>

and apply this theme to your Activity in the manifest.

like image 68
Archie.bpgc Avatar answered Oct 28 '22 17:10

Archie.bpgc