コード例 #1
0
        private void updateTextButtonVisibility()
        {
            bool visible = !android.text.TextUtils.isEmpty(mTextButton.getText());

            visible &= mImageButton.getDrawable() == null || (mItemData.showsTextAsAction() &&
                                                              (mAllowTextWithIcon || mExpandedFormat));
            mTextButton.setVisibility(visible ? VISIBLE : GONE);
        }