sanevys
sanevys

Reputation: 569

actionbar overflow menu items icons padding

image

Hello, I would like to know if it's possible to somehow reduce margin, that android:icon="@drawable/ic_credit_card_black_18dp" creates for menu item

`

    <menu>
        <item
                android:id="@+id/menu_profile"
                android:title="@string/settings_profile_title">
        </item>

        <item
            android:id="@+id/menu_cards"
            android:icon="@drawable/ic_credit_card_black_18dp"
            app:showAsAction="always|withText"
            android:title="@string/settings_cards_title">
        </item>
        <item
                android:id="@+id/menu_notifications"
                android:title="@string/settings_notifications_title">
        </item>`

...

Upvotes: 1

Views: 1910

Answers (1)

TommySM
TommySM

Reputation: 3883

You would need to create a style on your styles.xml and set @style/AppTheme as the Activity's theme, if I'm not mistaken the default is 80dip or 50dip (might be for width, your looking for height).

Try adding this in you styles.xml

<style name="AppTheme" parent="AppBaseTheme">
    <item name="android:actionBarStyle">@style/CustomActionBarStyle</item>
</style>

<style name="CustomActionBarStyle" parent="AppBaseTheme">
    <item name="android:minHeight">15dip</item>
    <item name="android:maxHeight">15dip</item>
    <item name="android:padding">0dip</item>
</style>

Upvotes: 2

Related Questions