本文整理汇总了Java中android.support.v7.internal.widget.TintManager类的典型用法代码示例。如果您正苦于以下问题:Java TintManager类的具体用法?Java TintManager怎么用?Java TintManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TintManager类属于android.support.v7.internal.widget包,在下文中一共展示了TintManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AppCompatBEditText
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
public AppCompatBEditText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(TintContextWrapper.wrap(context), attrs, defStyleAttr);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AppCompatBEditText, defStyleAttr, defStyleRes);
boolean tintAPI21 = a.getBoolean(R.styleable.AppCompatBEditText_tintAPI21, false);
a.recycle();
if (tintAPI21 || TintManager.SHOULD_BE_USED) {
TintTypedArray ta = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
TINT_ATTRS, defStyleAttr, 0);
if (ta.hasValue(0)) {
ColorStateList tint = applyWorkaroundForGetTintList(ta.getTintManager());
if (tint != null) {
setSupportBackgroundTintList(tint);
}
}
ta.recycle();
}
}
示例2: AppCompatBTextView
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
public AppCompatBTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(TintContextWrapper.wrap(context), attrs, defStyleAttr);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AppCompatBTextView, defStyleAttr, defStyleRes);
boolean tintAPI21 = a.getBoolean(R.styleable.AppCompatBTextView_tintAPI21, false);
a.recycle();
if (tintAPI21 || TintManager.SHOULD_BE_USED) {
TintTypedArray ta = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
TINT_ATTRS, defStyleAttr, 0);
if (ta.hasValue(0)) {
ColorStateList tint = AppCompatBEditText.applyWorkaroundForGetTintList(ta.getTintManager());
if (tint != null) {
setSupportBackgroundTintList(tint);
}
}
ta.recycle();
}
}
示例3: AppCompatLinearLayout
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
public AppCompatLinearLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(TintContextWrapper.wrap(context), attrs, defStyleAttr);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AppCompatLinearLayout, defStyleAttr, defStyleRes);
boolean tintAPI21 = a.getBoolean(R.styleable.AppCompatLinearLayout_tintAPI21, false);
a.recycle();
if (tintAPI21 || TintManager.SHOULD_BE_USED) {
TintTypedArray ta = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
TINT_ATTRS, defStyleAttr, 0);
if (ta.hasValue(0)) {
ColorStateList tint = AppCompatBEditText.applyWorkaroundForGetTintList(ta.getTintManager());
if (tint != null) {
setSupportBackgroundTintList(tint);
}
}
ta.recycle();
}
}
示例4: loadFromAttributes
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
final void loadFromAttributes(AttributeSet paramAttributeSet, int paramInt)
{
super.loadFromAttributes(paramAttributeSet, paramInt);
Context localContext = this.mView.getContext();
TintManager localTintManager = TintManager.get(localContext);
TypedArray localTypedArray = localContext.obtainStyledAttributes(paramAttributeSet, VIEW_ATTRS_v17, paramInt, 0);
if (localTypedArray.hasValue(0))
{
this.mDrawableStartTint = new TintInfo();
this.mDrawableStartTint.mHasTintList = true;
this.mDrawableStartTint.mTintList = localTintManager.getTintList(localTypedArray.getResourceId(0, 0));
}
if (localTypedArray.hasValue(1))
{
this.mDrawableEndTint = new TintInfo();
this.mDrawableEndTint.mHasTintList = true;
this.mDrawableEndTint.mTintList = localTintManager.getTintList(localTypedArray.getResourceId(1, 0));
}
localTypedArray.recycle();
}
示例5: applySupportBackgroundTint
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
final void applySupportBackgroundTint()
{
Drawable localDrawable = this.mView.getBackground();
if (localDrawable != null)
{
if (this.mBackgroundTint == null) {
break label35;
}
TintManager.tintDrawable(localDrawable, this.mBackgroundTint, this.mView.getDrawableState());
}
label35:
while (this.mInternalBackgroundTint == null) {
return;
}
TintManager.tintDrawable(localDrawable, this.mInternalBackgroundTint, this.mView.getDrawableState());
}
示例6: getIcon
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
public Drawable getIcon()
{
if (mIconDrawable != null)
{
return mIconDrawable;
}
if (mIconResId != 0)
{
Drawable drawable = TintManager.getDrawable(mMenu.getContext(), mIconResId);
mIconResId = 0;
mIconDrawable = drawable;
return drawable;
} else
{
return null;
}
}
示例7: AppCompatRatingBar
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
public AppCompatRatingBar(Context context, AttributeSet attributeset, int i)
{
super(context, attributeset, i);
if (TintManager.SHOULD_BE_USED)
{
context = TintTypedArray.obtainStyledAttributes(getContext(), attributeset, TINT_ATTRS, i, 0);
attributeset = context.getDrawableIfKnown(0);
if (attributeset != null)
{
setIndeterminateDrawable(tileifyIndeterminate(attributeset));
}
attributeset = context.getDrawableIfKnown(1);
if (attributeset != null)
{
setProgressDrawable(tileify(attributeset, false));
}
context.recycle();
}
}
示例8: AppCompatBCheckBox
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
public AppCompatBCheckBox(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AppCompatBCheckBox, defStyleAttr, defStyleRes);
boolean tintAPI21 = a.getBoolean(R.styleable.AppCompatBCheckBox_tintAPI21, false);
a.recycle();
if (tintAPI21 || TintManager.SHOULD_BE_USED) {
mTintManager = TintManager.get(context);
a = context.obtainStyledAttributes(attrs, TINT_ATTRS, defStyleAttr, 0);
setButtonDrawable(a.getDrawable(0));
a.recycle();
}
}
示例9: getIcon
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
public final Drawable getIcon()
{
if (this.mIconDrawable != null) {
return this.mIconDrawable;
}
if (this.mIconResId != 0)
{
Drawable localDrawable = TintManager.getDrawable(this.mMenu.mContext, this.mIconResId);
this.mIconResId = 0;
this.mIconDrawable = localDrawable;
return localDrawable;
}
return null;
}
示例10: AppCompatCheckedTextView
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
private AppCompatCheckedTextView(Context paramContext, AttributeSet paramAttributeSet, byte paramByte)
{
super(paramContext, paramAttributeSet, 16843720);
this.mTextHelper.loadFromAttributes(paramAttributeSet, 16843720);
this.mTextHelper.applyCompoundDrawablesTints();
if (TintManager.SHOULD_BE_USED)
{
TintTypedArray localTintTypedArray = TintTypedArray.obtainStyledAttributes$1a6c1917(getContext(), paramAttributeSet, TINT_ATTRS, 16843720);
setCheckMarkDrawable(localTintTypedArray.getDrawable(0));
localTintTypedArray.mWrapped.recycle();
this.mTintManager = localTintTypedArray.getTintManager();
}
}
示例11: AppCompatSeekBar
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
private AppCompatSeekBar(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
this.mTintManager = TintManager.get(paramContext);
this.mAppCompatSeekBarHelper = new AppCompatSeekBarHelper(this, this.mTintManager);
this.mAppCompatSeekBarHelper.loadFromAttributes(paramAttributeSet, paramInt);
}
示例12: AppCompatCheckBox
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
private AppCompatCheckBox(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
this.mTintManager = TintManager.get(paramContext);
this.mCompoundButtonHelper = new AppCompatCompoundButtonHelper(this, this.mTintManager);
this.mCompoundButtonHelper.loadFromAttributes(paramAttributeSet, paramInt);
}
示例13: AppCompatImageButton
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
private AppCompatImageButton(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
TintManager localTintManager = TintManager.get(paramContext);
this.mBackgroundTintHelper = new AppCompatBackgroundHelper(this, localTintManager);
this.mBackgroundTintHelper.loadFromAttributes(paramAttributeSet, paramInt);
this.mImageHelper = new AppCompatImageHelper(this, localTintManager);
this.mImageHelper.loadFromAttributes(paramAttributeSet, paramInt);
}
示例14: AppCompatRadioButton
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
private AppCompatRadioButton(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
this.mTintManager = TintManager.get(paramContext);
this.mCompoundButtonHelper = new AppCompatCompoundButtonHelper(this, this.mTintManager);
this.mCompoundButtonHelper.loadFromAttributes(paramAttributeSet, paramInt);
}
示例15: AppCompatRatingBar
import android.support.v7.internal.widget.TintManager; //导入依赖的package包/类
private AppCompatRatingBar(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
this.mTintManager = TintManager.get(paramContext);
this.mAppCompatProgressBarHelper = new AppCompatProgressBarHelper(this, this.mTintManager);
this.mAppCompatProgressBarHelper.loadFromAttributes(paramAttributeSet, paramInt);
}