当前位置: 首页>>代码示例>>Java>>正文


Java TintManager类代码示例

本文整理汇总了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();
    }
}
 
开发者ID:ZalemSoftware,项目名称:Ymir,代码行数:20,代码来源:AppCompatBEditText.java

示例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();
    }
}
 
开发者ID:ZalemSoftware,项目名称:Ymir,代码行数:20,代码来源:AppCompatBTextView.java

示例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();
    }
}
 
开发者ID:ZalemSoftware,项目名称:Ymir,代码行数:20,代码来源:AppCompatLinearLayout.java

示例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();
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:21,代码来源:AppCompatTextHelperV17.java

示例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());
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:17,代码来源:AppCompatBackgroundHelper.java

示例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;
    }
}
 
开发者ID:Hamz-a,项目名称:MyCTFWriteUps,代码行数:18,代码来源:MenuItemImpl.java

示例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();
    }
}
 
开发者ID:Hamz-a,项目名称:MyCTFWriteUps,代码行数:20,代码来源:AppCompatRatingBar.java

示例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();
    }
}
 
开发者ID:ZalemSoftware,项目名称:Ymir,代码行数:16,代码来源:AppCompatBCheckBox.java

示例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;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:15,代码来源:MenuItemImpl.java

示例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();
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:14,代码来源:AppCompatCheckedTextView.java

示例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);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:8,代码来源:AppCompatSeekBar.java

示例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);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:8,代码来源:AppCompatCheckBox.java

示例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);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:10,代码来源:AppCompatImageButton.java

示例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);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:8,代码来源:AppCompatRadioButton.java

示例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);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:8,代码来源:AppCompatRatingBar.java


注:本文中的android.support.v7.internal.widget.TintManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。