Example #1
0
        public virtual void setShortcut(bool showShortcut, char shortcutKey)
        {
            int newVisibility = (showShortcut && mItemData.shouldShowShortcut()) ? VISIBLE :
                                GONE;

            if (newVisibility == VISIBLE)
            {
                mShortcutView.setText(java.lang.CharSequenceProxy.Wrap(mItemData.getShortcutLabel
                                                                           ()));
            }
            if (mShortcutView.getVisibility() != newVisibility)
            {
                mShortcutView.setVisibility(newVisibility);
            }
        }
Example #2
0
 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);
 }