List of usage examples for android.widget ActionMenuView generateLayoutParams
@Override
protected LayoutParams generateLayoutParams(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 a v a 2s.c om*/ } 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; }