Suppose I do not want to refer to an external file using app:actionLayout . How instead of app:actionLayout insert the markup code directly into <item> ?
<item android:id="@+id/item1" android:title="@string/item1" app:actionLayout="@layout/layout1" // сюда код layout с произвольным содержимым app:showAsAction="always" />