Nicolas
Nicolas

Reputation: 7121

Remove toolbar button padding Android

I'm trying to fit more button into the toolbar by removing some extra padding on button but I didn't find any way to do that.

enter image description here

I'm trying to remove the padding in red.

I tried adding this to the manifest

<item name="android:actionButtonStyle">@style/ActionButtonStyle</item>

And this to styles.xml

<style name="ActionButtonStyle" parent="@android:style/Widget.Holo.Light.ActionButton">
    <item name="android:minWidth">0dip</item>
    <item name="android:paddingLeft">0dip</item>
    <item name="android:paddingRight">0dip</item>                  
</style>

But it didn't work. Is there any other solution?

Upvotes: 0

Views: 332

Answers (1)

PulkitG
PulkitG

Reputation: 662

In default Action bar you cannot reduce the padding. So you just create a custom toolbar for that and keep padding 0dp

Upvotes: 1

Related Questions