public void initialize([email protected] itemData, int menuType
                        )
 {
     mItemData = itemData;
     initialize(itemData.getTitleForItemView(this), itemData.getIcon());
     setVisibility(itemData.isVisible() ? android.view.View.VISIBLE : android.view.View
                   .GONE);
     setEnabled(itemData.isEnabled());
 }
Beispiel #2
0
 public virtual void initialize([email protected] itemData,
                                int menuType)
 {
     mItemData = itemData;
     setIcon(itemData.getIcon());
     setTitle(itemData.getTitleForItemView(this));
     // Title only takes effect if there is no icon
     setId(itemData.getItemId());
     setVisibility(itemData.isVisible() ? android.view.View.VISIBLE : android.view.View
                   .GONE);
     setEnabled(itemData.isEnabled());
 }
 public override void bindItemView([email protected] item,
                                   [email protected] itemView)
 {
     [email protected] view = ([email protected]
                                                          )itemView;
     view.setItemData(item);
     view.initialize(item.getTitleForItemView(view), item.getIcon());
     view.setVisibility(item.isVisible() ? android.view.View.VISIBLE : android.view.View
                        .GONE);
     view.setEnabled(view.isEnabled());
     view.setLayoutParams(view.getTextAppropriateLayoutParams());
 }
Beispiel #4
0
 public virtual void initialize([email protected] itemData,
                                int menuType)
 {
     mItemData = itemData;
     mMenuType = menuType;
     setVisibility(itemData.isVisible() ? android.view.View.VISIBLE : android.view.View
                   .GONE);
     setTitle(itemData.getTitleForItemView(this));
     setCheckable(itemData.isCheckable());
     setShortcut(itemData.shouldShowShortcut(), itemData.getShortcut());
     setIcon(itemData.getIcon());
     setEnabled(itemData.isEnabled());
 }
 internal void setCaptionMode(bool shortcut)
 {
     if (mItemData == null)
     {
         return;
     }
     mShortcutCaptionMode = shortcut && (mItemData.shouldShowShortcut());
     java.lang.CharSequence text = mItemData.getTitleForItemView(this);
     if (mShortcutCaptionMode)
     {
         if (mShortcutCaption == null)
         {
             mShortcutCaption = mItemData.getShortcutLabel();
         }
         text = java.lang.CharSequenceProxy.Wrap(mShortcutCaption);
     }
     setText(text);
 }