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());
 }
Exemple #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());
 }
Exemple #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());
 }
Exemple #5
0
 public virtual bool needsDividerBefore()
 {
     return(hasText() && mItemData.getIcon() == null);
 }