@Override public void setBackgroundDrawable(Drawable background) { super.setBackgroundDrawable(background); if (mBackgroundHelper != null) { mBackgroundHelper.setBackgroundDrawableExternal(background); } }
/** */ @Override @SuppressWarnings("deprecation") public void setBackgroundDrawable(Drawable background) { super.setBackgroundDrawable(background); this.ensureDecorator(); mDecorator.applyBackgroundTint(); }
/** */ @Override @SuppressWarnings("deprecation") public void setBackgroundDrawable(Drawable background) { super.setBackgroundDrawable(background); this.ensureDecorator(); mDecorator.applyBackgroundTint(); }
/** * 设置Tab样式 * * @param rb Tab项 * @param checked 是否选中 */ private void setTabStyle(RadioButton rb, boolean checked) { if (checked) { rb.setTextColor(mNavTextCheckedColor); if (null == mNavBgCheckedImg) { rb.setBackgroundColor(mNavBgCheckedColor); } else { rb.setBackgroundDrawable(mNavBgCheckedImg); } } else { rb.setTextColor(mNavTextDefaultColor); rb.setBackgroundColor(Color.TRANSPARENT); rb.setBackgroundDrawable(null); } }
femaleButton.setBackgroundDrawable(getResources().getDrawable( R.drawable.unselected_left_background)); maleButton.setBackgroundDrawable(getResources().getDrawable( R.drawable.selected_right_background)); } else { if (checked) { if (android.os.Build.VERSION.SDK_INT < 16) { femaleButton.setBackgroundDrawable(getResources().getDrawable( R.drawable.selected_left_background)); maleButton.setBackgroundDrawable(getResources().getDrawable( R.drawable.unselected_right_background)); } else {
mRadioButton.setBackground(getStateDrawable(i)); } else { mRadioButton.setBackgroundDrawable(getStateDrawable(i));
newRadioButton.setBackground(selectorDrawable); else newRadioButton.setBackgroundDrawable(selectorDrawable);