0

How to customize the Option Menu item layout from xml or programmatically. I found many question but no good answer yet.

How to change Option Menu Style

How to change layout by clicking items of menu?

How to change Menu Item Color & Size programmatically?

Community
  • 1
  • 1

1 Answers1

1
<item
    android:id="@+id/itemId"
    android:title="Item title"
    app:showAsAction="always"
    app:actionLayout="@layout/menu_item_layout" />

Note that this layout will be shown only in the ActionBar. If the item is in the overflow menu only title will be shown.

nitrico
  • 603
  • 6
  • 9