The reason your icon doesn't fill the ActionBar is because the ActionMenuItemView measures the icon.
ActionMenuItemView calls a maximum size of 32dp when it sets the borders for your icon
So, it is so different from the size of your image, the system will always resize it.
Any idea how I can get a check to populate the action bar?
You should use the action layout for MenuItem , the checkmark icon without background and change the background color of the parent action layout as you see fit. Here is an example:
layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="?android:attr/actionButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#e8e8e8" android:clickable="true" android:contentDescription="@string/cd" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@null" android:scaleType="centerInside" android:src="@drawable/ic_action_tick" /> </RelativeLayout>
MenuItem
<item android:id="@+id/action_submit" android:actionLayout="@layout/your_action_layout" android:showAsAction="always"/>
Availability
It is important that your MenuItem is available. Usually, when you click an item in an ActionBar for a long time, a short Toast will display a description of the content for you, but when you use a custom MenuItem for you to implement this template. An easy way to do this is with the Roman Nurik CheatSheet . If you do not know how to use it, you should refer to my answer here , which contains more detailed information on creating custom MenuItem layouts.
As an alternative
If you want to use this background color for each MenuItem , you can create your own style and apply it using the android:actionButtonStyle . Here is an example of this:
Your style
<style name="Your.ActionButton" parent="@android:style/Widget.Holo.Light.ActionButton"> <item name="android:background">#e8e8e8</item> </style>
Your subject
<style name="Your.Theme" parent="@android:style/Theme.Holo.Light"> <item name="android:actionButtonStyle">@style/Your.ActionButton</item> </style>
results

source share