Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 protected internal override void drawableStateChanged()
 {
     base.drawableStateChanged();
     if (mItemData != null && mIcon != null)
     {
         // When disabled, the not-focused state and the pressed state should
         // drop alpha on the icon
         bool isInAlphaState = !mItemData.isEnabled() && (isPressed() || !isFocused());
         mIcon.setAlpha(isInAlphaState ? (int)(mDisabledAlpha * NO_ALPHA) : NO_ALPHA);
     }
 }
Ejemplo n.º 3
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());
 }
Ejemplo n.º 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());
 }