List of usage examples for android.widget ActionMenuView checkLayoutParams
@Override protected boolean checkLayoutParams(ViewGroup.LayoutParams p)
From source file:lewa.support.v7.internal.view.menu.ActionMenuPresenter.java
@Override public View getItemView(MenuItemImpl item, View convertView, ViewGroup parent) { View actionView = item.getActionView(); if (actionView == null || item.hasCollapsibleActionView()) { if (!(convertView instanceof ActionMenuItemView)) { convertView = null;/*from w w w . j ava 2 s .c o m*/ } actionView = super.getItemView(item, convertView, parent); } actionView.setVisibility(item.isActionViewExpanded() ? View.GONE : View.VISIBLE); final ActionMenuView menuParent = (ActionMenuView) parent; final ViewGroup.LayoutParams lp = actionView.getLayoutParams(); if (!menuParent.checkLayoutParams(lp)) { actionView.setLayoutParams(menuParent.generateLayoutParams(lp)); } return actionView; }