You can use app:actionLayout="@layout/layout_name"
property of item tag like
and your layout_name
is any layout file like
// add your horizontal menu item here
and you can access this item
@Override
public boolean onPrepareOptionsMenu(Menu menu)
{
MenuItem item = menu.findItem(R.id.menu_id);
Linearlayout rootView = (LinearLayout)item.getActionView();
YourControlClass control = (YourControlClass)
rootView.findViewById(R.id.control_id);
return true;
}