Example #1
0
        public override void updateMenuView(bool cleared)
        {
            [email protected] menuView = ([email protected]
                                                                 )mMenuView;
            if (mMaxItems < 0)
            {
                mMaxItems = menuView.getMaxItems();
            }
            java.util.ArrayList <*****@*****.**> itemsToShow = mMenu
                                                                                         .getNonActionItems();
            bool needsMore = itemsToShow.size() > mMaxItems;

            base.updateMenuView(cleared);
            if (needsMore && (mMoreView == null || mMoreView.getParent() != menuView))
            {
                if (mMoreView == null)
                {
                    mMoreView = menuView.createMoreItemView();
                    mMoreView.setBackgroundDrawable(menuView.getItemBackgroundDrawable());
                }
                menuView.addView(mMoreView);
            }
            else
            {
                if (!needsMore && mMoreView != null)
                {
                    menuView.removeView(mMoreView);
                }
            }
            menuView.setNumActualItemsShown(needsMore ? mMaxItems - 1 : itemsToShow.size());
        }
Example #2
0
 protected internal override void addItemView(android.view.View itemView, int childIndex
                                              )
 {
     [email protected] v = ([email protected]
                                                       )itemView;
     [email protected] parent = ([email protected]
                                                        )mMenuView;
     v.setIconMenuView(parent);
     v.setItemInvoker(parent);
     v.setBackgroundDrawable(parent.getItemBackgroundDrawable());
     base.addItemView(itemView, childIndex);
 }
Example #3
0
		internal void setIconMenuView([email protected] iconMenuView
			)
		{
			mIconMenuView = iconMenuView;
		}
Example #4
0
 internal void setIconMenuView([email protected] iconMenuView
                               )
 {
     mIconMenuView = iconMenuView;
 }