• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TintTypedArray类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中android.support.v7.widget.TintTypedArray的典型用法代码示例。如果您正苦于以下问题:Java TintTypedArray类的具体用法?Java TintTypedArray怎么用?Java TintTypedArray使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TintTypedArray类属于android.support.v7.widget包,在下文中一共展示了TintTypedArray类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setCollapsedTextAppearance

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public void setCollapsedTextAppearance(int resId) {
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(mView.getContext(), resId, R.styleable.QMUITextAppearance);
    if (a.hasValue(R.styleable.QMUITextAppearance_android_textColor)) {
        mCollapsedTextColor = a.getColorStateList(R.styleable.QMUITextAppearance_android_textColor);
    }
    if (a.hasValue(R.styleable.QMUITextAppearance_android_textSize)) {
        mCollapsedTextSize = a.getDimensionPixelSize(R.styleable.QMUITextAppearance_android_textSize,
                (int) mCollapsedTextSize);
    }
    mCollapsedShadowColor = a.getInt(R.styleable.QMUITextAppearance_android_shadowColor, 0);
    mCollapsedShadowDx = a.getFloat(R.styleable.QMUITextAppearance_android_shadowDx, 0);
    mCollapsedShadowDy = a.getFloat(R.styleable.QMUITextAppearance_android_shadowDy, 0);
    mCollapsedShadowRadius = a.getFloat(R.styleable.QMUITextAppearance_android_shadowRadius, 0);
    a.recycle();

    if (Build.VERSION.SDK_INT >= 16) {
        mCollapsedTypeface = readFontFamilyTypeface(resId);
    }

    recalculate();
}
 
开发者ID:coopese,项目名称:qmui,代码行数:22,代码来源:QMUICollapsingTextHelper.java


示例2: setExpandedTextAppearance

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public void setExpandedTextAppearance(int resId) {
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(mView.getContext(), resId, R.styleable.QMUITextAppearance);
    if (a.hasValue(R.styleable.QMUITextAppearance_android_textColor)) {
        mExpandedTextColor = a.getColorStateList(R.styleable.QMUITextAppearance_android_textColor);
    }
    if (a.hasValue(R.styleable.QMUITextAppearance_android_textSize)) {
        mExpandedTextSize = a.getDimensionPixelSize(R.styleable.QMUITextAppearance_android_textSize,
                (int) mExpandedTextSize);
    }
    mExpandedShadowColor = a.getInt(
            R.styleable.QMUITextAppearance_android_shadowColor, 0);
    mExpandedShadowDx = a.getFloat(
            R.styleable.QMUITextAppearance_android_shadowDx, 0);
    mExpandedShadowDy = a.getFloat(
            R.styleable.QMUITextAppearance_android_shadowDy, 0);
    mExpandedShadowRadius = a.getFloat(
            R.styleable.QMUITextAppearance_android_shadowRadius, 0);
    a.recycle();

    if (Build.VERSION.SDK_INT >= 16) {
        mExpandedTypeface = readFontFamilyTypeface(resId);
    }

    recalculate();
}
 
开发者ID:coopese,项目名称:qmui,代码行数:26,代码来源:QMUICollapsingTextHelper.java


示例3: reSetTitleStyle

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
/**
 * 重新设置标题的样式
 *
 * @param context
 * @param attrs
 * @param defStyleAttr
 */
private void reSetTitleStyle(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {

    final TintTypedArray a = TintTypedArray.obtainStyledAttributes(context, attrs,
            R.styleable.Toolbar, defStyleAttr, 0);
    final int titleTextAppearance = a.getResourceId(R.styleable.Toolbar_titleTextAppearance, 0);
    if (titleTextAppearance != 0) {
        setTitleTextAppearance(context, titleTextAppearance);
    }
    if (mTitleTextColor != 0) {
        setTitleTextColor(mTitleTextColor);
    }
    a.recycle();
    post(new Runnable() {
        @Override
        public void run() {
            if (getLayoutParams() instanceof LayoutParams) {
                ((LayoutParams) getLayoutParams()).gravity = Gravity.CENTER;
            }
        }
    });
}
 
开发者ID:forplane,项目名称:head,代码行数:29,代码来源:HeadToolBar.java


示例4: reSetSubTitleStyle

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
/**
 * 重新设置标题的样式
 *
 * @param context
 * @param attrs
 * @param defStyleAttr
 */
private void reSetSubTitleStyle(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {

    final TintTypedArray a = TintTypedArray.obtainStyledAttributes(context, attrs,
            R.styleable.Toolbar, defStyleAttr, 0);
    final int titleTextAppearance = a.getResourceId(R.styleable.Toolbar_subtitleTextAppearance, 0);
    if (titleTextAppearance != 0) {
        setSubtitleTextAppearance(context, titleTextAppearance);
    }
    if (mSubtitleTextColor != 0) {
        setTitleTextColor(mSubtitleTextColor);
    }
    a.recycle();
    post(new Runnable() {
        @Override
        public void run() {
            if (getLayoutParams() instanceof LayoutParams) {
                ((LayoutParams) getLayoutParams()).gravity = Gravity.CENTER;
            }
        }
    });

}
 
开发者ID:forplane,项目名称:head,代码行数:30,代码来源:HeadToolBar.java


示例5: MyToolBar

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public MyToolBar(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    initview();
    if (attrs != null) {

        final TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
                R.styleable.MyToolBar, defStyleAttr, 0);
        showSearchView = a.getBoolean(R.styleable.MyToolBar_showSearchView, false);
        left_button_icon = a.getDrawable(R.styleable.MyToolBar_leftButtonIcon);
        right_button_icon = a.getDrawable(R.styleable.MyToolBar_rightButtonIcon);
        title = a.getString(R.styleable.MyToolBar_myTitle);
        a.recycle();
    }

    isShouw();

    setContentInsetsRelative(10, 10);

    initListener();

}
 
开发者ID:yiwent,项目名称:Mobike,代码行数:22,代码来源:MyToolBar.java


示例6: init

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
private void init(final AttributeSet attrs, final int defStyleAttr) {
    final TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
            R.styleable.IcButtonStyle, defStyleAttr, 0);
    try {
        final AppCompatDrawableManager drawableManager = AppCompatDrawableManager.get();
        Drawable rightIcon = a.getDrawableIfKnown(R.styleable.IcButtonStyle_rightIcon);

        int id = a.getResourceId(R.styleable.IcButtonStyle_rightIcon, -1);
        if (id != -1) {
            rightIcon = drawableManager.getDrawable(getContext(), id);
        }
        Drawable topIcon = a.getDrawableIfKnown(R.styleable.IcButtonStyle_topIcon);
        id = a.getResourceId(R.styleable.IcButtonStyle_topIcon, -1);
        if (id != -1) {
            topIcon = drawableManager.getDrawable(getContext(), id);
        }

        setCompoundDrawablesWithIntrinsicBounds(null, topIcon, rightIcon, null);
    } finally {
        a.recycle();
    }
}
 
开发者ID:deniotokiari,项目名称:training-epam-2016,代码行数:23,代码来源:IcButton.java


示例7: createDummyTextView

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
@SuppressLint("PrivateResource")
private void createDummyTextView(Context context) {
    final TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), null,
            R.styleable.Toolbar, R.attr.toolbarStyle, 0);
    int titleTextAppearance =
            a.getResourceId(R.styleable.Toolbar_titleTextAppearance, 0);
    a.recycle();

    dummy = new TextView(context);
    dummy.setSingleLine();
    dummy.setEllipsize(TextUtils.TruncateAt.END);
    TextViewCompat.setTextAppearance(dummy, titleTextAppearance);
    collapsedTextSize = dummy.getTextSize();
    expendedTextSize = collapsedTextSize * TEXT_SCALE_FACTOR;
    dummy.setTextSize(ViewUtils.convertPixelToSp(expendedTextSize));
    dummy.setVisibility(INVISIBLE);
    addView(dummy, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
}
 
开发者ID:wix,项目名称:react-native-navigation,代码行数:19,代码来源:CollapsingTextView.java


示例8: setCollapsedTextAppearance

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public void setCollapsedTextAppearance(int resId) {
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(mView.getContext(), resId,
            android.support.v7.appcompat.R.styleable.TextAppearance);
    if (a.hasValue(android.support.v7.appcompat.R.styleable.TextAppearance_android_textColor)) {
        mCollapsedTextColor = a.getColorStateList(
                android.support.v7.appcompat.R.styleable.TextAppearance_android_textColor);
    }
    if (a.hasValue(android.support.v7.appcompat.R.styleable.TextAppearance_android_textSize)) {
        mCollapsedTextSize = a.getDimensionPixelSize(
                android.support.v7.appcompat.R.styleable.TextAppearance_android_textSize,
                (int) mCollapsedTextSize);
    }
    mCollapsedShadowColor = a.getInt(
            android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowColor, 0);
    mCollapsedShadowDx = a.getFloat(
            android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowDx, 0);
    mCollapsedShadowDy = a.getFloat(
            android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowDy, 0);
    mCollapsedShadowRadius = a.getFloat(
            android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowRadius, 0);
    a.recycle();
    if (Build.VERSION.SDK_INT >= 16) {
        mCollapsedTypeface = readFontFamilyTypeface(resId);
    }
    recalculate();
}
 
开发者ID:bufferapp,项目名称:BufferTextInputLayout,代码行数:27,代码来源:CollapsingTextHelper.java


示例9: setExpandedTextAppearance

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public void setExpandedTextAppearance(int resId) {
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(mView.getContext(), resId,
            android.support.v7.appcompat.R.styleable.TextAppearance);
    if (a.hasValue(android.support.v7.appcompat.R.styleable.TextAppearance_android_textColor)) {
        mExpandedTextColor = a.getColorStateList(
                android.support.v7.appcompat.R.styleable.TextAppearance_android_textColor);
    }
    if (a.hasValue(android.support.v7.appcompat.R.styleable.TextAppearance_android_textSize)) {
        mExpandedTextSize = a.getDimensionPixelSize(
                android.support.v7.appcompat.R.styleable.TextAppearance_android_textSize,
                (int) mExpandedTextSize);
    }
    mExpandedShadowColor = a.getInt(
            android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowColor, 0);
    mExpandedShadowDx = a.getFloat(
            android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowDx, 0);
    mExpandedShadowDy = a.getFloat(
            android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowDy, 0);
    mExpandedShadowRadius = a.getFloat(
            android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowRadius, 0);
    a.recycle();
    if (Build.VERSION.SDK_INT >= 16) {
        mExpandedTypeface = readFontFamilyTypeface(resId);
    }
    recalculate();
}
 
开发者ID:bufferapp,项目名称:BufferTextInputLayout,代码行数:27,代码来源:CollapsingTextHelper.java


示例10: loadFromAttributes

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public void loadFromAttributes(AttributeSet attrs, int defStyleAttr) {
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(mView.getContext(), attrs,
            com.ljz.base.widget.R.styleable.SelectorInjection, defStyleAttr, 0);

    Drawable[] drawables = mView.getCompoundDrawables();
    try {
        int leftColor = a.getColor(com.ljz.base.widget.R.styleable.SelectorInjection_drawableLeftTint, DEFAULT_COLOR);
        int topColor = a.getColor(com.ljz.base.widget.R.styleable.SelectorInjection_drawableTopTint, DEFAULT_COLOR);
        int rightColor = a.getColor(com.ljz.base.widget.R.styleable.SelectorInjection_drawableRightTint, DEFAULT_COLOR);
        int bottomColor = a.getColor(com.ljz.base.widget.R.styleable.SelectorInjection_drawableBottomTint, DEFAULT_COLOR);

        int[] colors = {leftColor, topColor, rightColor, bottomColor};
        tintDrawable(drawables, colors);
    } finally {
        a.recycle();
    }
}
 
开发者ID:lujianzhao,项目名称:AndroidBase,代码行数:18,代码来源:AppCompatTextViewHelper.java


示例11: ColorToolBar

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public ColorToolBar(Context context, @Nullable AttributeSet attrs) {
    super(context, attrs);
    int attributeCount = attrs.getAttributeCount();
    for (int i = 0; i < attributeCount; i++) {
        String attributeName = attrs.getAttributeName(i);
        Log.i(TAG, "ColorToolBar: "+attributeName);
    }
        Log.i(TAG, "ColorToolBar: -----------------------------------------------------------");
    TypedValue tv = new TypedValue();

    final TintTypedArray typedArray = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
            android.support.v7.appcompat.R.styleable.Toolbar, 0, 0);
    int indexCount = typedArray.getIndexCount();
    int resourceId = typedArray.getResourceId(android.support.v7.appcompat.R.styleable.Toolbar_popupTheme, -1);
        Log.i(TAG, "ColorToolBar: "+(resourceId > 0 ? "获取到资源id :"+ resourceId : "未获取到资源id"));
    for (int i = 0; i < indexCount; i++) {
        typedArray.getValue(i,tv);
        Log.i(TAG, "ColorToolBar: "+tv.toString());
    }

}
 
开发者ID:peerless2012,项目名称:QingNianTuZhai,代码行数:22,代码来源:ColorToolBar.java


示例12: KyToolBar

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public KyToolBar(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
  super(context, attrs, defStyleAttr);

  initView();
  final TintTypedArray a =
      TintTypedArray.obtainStyledAttributes(getContext(), attrs, R.styleable.KyToolbar,
          defStyleAttr, 0);
  final boolean enableKyNavigationIcon =
      a.getBoolean(R.styleable.KyToolbar_enableKyNavigationIcon, true);
  final boolean enableKySearch = a.getBoolean(R.styleable.KyToolbar_enableKySearch, false);
  final Drawable navIcon = a.getDrawable(R.styleable.KyToolbar_KyNavigationIcon);
  final Drawable rightButtonIcon = a.getDrawable(R.styleable.KyToolbar_setRightButton);
  final String rightText = a.getString(R.styleable.KyToolbar_setRightText);

  setNavigationIcon(navIcon);
  setRightButtonIcon(rightButtonIcon);
  enableKyNavigation(enableKyNavigationIcon);
  setRightTextView(rightText);
  setEnabledSearch(enableKySearch);
  a.recycle();
}
 
开发者ID:bitkylin,项目名称:BitkyShop,代码行数:22,代码来源:KyToolBar.java


示例13: CNiaoToolBar

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public CNiaoToolBar(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);

    initView();
    setContentInsetsRelative(10,10);

    if(attrs !=null) {
        final TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
                R.styleable.CNiaoToolBar, defStyleAttr, 0);

        final Drawable rightIcon = a.getDrawable(R.styleable.CNiaoToolBar_rightButtonIcon);
        if (rightIcon != null) {
            setRightButtonIcon(rightIcon);
        }


        boolean isShowSearchView = a.getBoolean(R.styleable.CNiaoToolBar_isShowSearchView,false);

        if(isShowSearchView){
            showSearchView();
            hideTitleView();
        }

        CharSequence rightButtonText = a.getText(R.styleable.CNiaoToolBar_rightButtonText);
        if(rightButtonText !=null){
            setRightButtonText(rightButtonText);
        }

        a.recycle();
    }

}
 
开发者ID:gaolhjy,项目名称:cniao5,代码行数:33,代码来源:CNiaoToolBar.java


示例14: loadFromAttributes

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
void loadFromAttributes(AttributeSet attrs, int defStyleAttr) {
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(mView.getContext(), attrs,
            TINT_ATTRS, defStyleAttr, 0);

    mIndeterminateDrawableResId = a.getResourceId(0, INVALID_ID);
    mProgressDrawableResId = a.getResourceId(1, INVALID_ID);

    a.recycle();
    applySkin();
}
 
开发者ID:wutongke,项目名称:AndroidSkinAnimator,代码行数:11,代码来源:SkinCompatProgressBarHelper.java


示例15: loadFromAttributes

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public void loadFromAttributes(AttributeSet attrs, int defStyleAttr) {
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(mView.getContext(), attrs,
            R.styleable.SkinBackgroundHelper, defStyleAttr, 0);
    try {
        if (a.hasValue(R.styleable.SkinBackgroundHelper_android_background)) {
            mBackgroundResId = a.getResourceId(
                    R.styleable.SkinBackgroundHelper_android_background, INVALID_ID);
        }
    } finally {
        a.recycle();
    }
    applySkin();
}
 
开发者ID:wutongke,项目名称:AndroidSkinAnimator,代码行数:14,代码来源:SkinCompatBackgroundHelper.java


示例16: SkinCompatAutoCompleteTextView

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public SkinCompatAutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
            TINT_ATTRS, defStyleAttr, 0);
    if (a.hasValue(0)) {
        mDropDownBackgroundResId = a.getResourceId(0, INVALID_ID);
    }
    a.recycle();
    applyDropDownBackgroundResource();
    mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
    mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
    mTextHelper = new SkinCompatTextHelper(this);
    mTextHelper.loadFromAttributes(attrs, defStyleAttr);
}
 
开发者ID:wutongke,项目名称:AndroidSkinAnimator,代码行数:15,代码来源:SkinCompatAutoCompleteTextView.java


示例17: SkinCompatMultiAutoCompleteTextView

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public SkinCompatMultiAutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
            TINT_ATTRS, defStyleAttr, 0);
    if (a.hasValue(0)) {
        mDropDownBackgroundResId = a.getResourceId(0, INVALID_ID);
    }
    a.recycle();
    applyDropDownBackgroundResource();
    mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
    mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
    mTextHelper = new SkinCompatTextHelper(this);
    mTextHelper.loadFromAttributes(attrs, defStyleAttr);
}
 
开发者ID:wutongke,项目名称:AndroidSkinAnimator,代码行数:15,代码来源:SkinCompatMultiAutoCompleteTextView.java


示例18: loadFromAttributes

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public void loadFromAttributes(AttributeSet attrs, int defStyleAttr) {
    final Context context = mView.getContext();

    // First read the TextAppearance style id
    TintTypedArray a = TintTypedArray.obtainStyledAttributes(context, attrs,
            R.styleable.SkinCompatTextHelper, defStyleAttr, 0);
    final int ap = a.getResourceId(R.styleable.SkinCompatTextHelper_android_textAppearance, INVALID_ID);
    SkinLog.d(TAG, "ap = " + ap);
    a.recycle();

    if (ap != INVALID_ID) {
        a = TintTypedArray.obtainStyledAttributes(context, ap, R.styleable.SkinTextAppearance);
        if (a.hasValue(R.styleable.SkinTextAppearance_android_textColor)) {
            mTextColorResId = a.getResourceId(R.styleable.SkinTextAppearance_android_textColor, INVALID_ID);
            SkinLog.d(TAG, "mTextColorResId = " + mTextColorResId);
        }
        if (a.hasValue(R.styleable.SkinTextAppearance_android_textColorHint)) {
            mTextColorHintResId = a.getResourceId(
                    R.styleable.SkinTextAppearance_android_textColorHint, INVALID_ID);
            SkinLog.d(TAG, "mTextColorHintResId = " + mTextColorHintResId);
        }
        a.recycle();
    }

    // Now read the style's values
    a = TintTypedArray.obtainStyledAttributes(context, attrs, R.styleable.SkinTextAppearance,
            defStyleAttr, 0);
    if (a.hasValue(R.styleable.SkinTextAppearance_android_textColor)) {
        mTextColorResId = a.getResourceId(R.styleable.SkinTextAppearance_android_textColor, INVALID_ID);
        SkinLog.d(TAG, "mTextColorResId = " + mTextColorResId);
    }
    if (a.hasValue(R.styleable.SkinTextAppearance_android_textColorHint)) {
        mTextColorHintResId = a.getResourceId(
                R.styleable.SkinTextAppearance_android_textColorHint, INVALID_ID);
        SkinLog.d(TAG, "mTextColorHintResId = " + mTextColorHintResId);
    }
    a.recycle();
    applySkin();
}
 
开发者ID:wutongke,项目名称:AndroidSkinAnimator,代码行数:40,代码来源:SkinCompatTextHelper.java


示例19: onSetTextAppearance

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
public void onSetTextAppearance(Context context, int resId) {
    final TintTypedArray a = TintTypedArray.obtainStyledAttributes(context,
            resId, R.styleable.SkinTextAppearance);
    if (a.hasValue(R.styleable.SkinTextAppearance_android_textColor)) {
        mTextColorResId = a.getResourceId(R.styleable.SkinTextAppearance_android_textColor, INVALID_ID);
        SkinLog.d(TAG, "mTextColorResId = " + mTextColorResId);
    }
    if (a.hasValue(R.styleable.SkinTextAppearance_android_textColorHint)) {
        mTextColorHintResId = a.getResourceId(R.styleable.SkinTextAppearance_android_textColorHint, INVALID_ID);
        SkinLog.d(TAG, "mTextColorHintResId = " + mTextColorHintResId);
    }
    a.recycle();
    applySkin();
}
 
开发者ID:wutongke,项目名称:AndroidSkinAnimator,代码行数:15,代码来源:SkinCompatTextHelper.java


示例20: loadFromAttributes

import android.support.v7.widget.TintTypedArray; //导入依赖的package包/类
@Override
    void loadFromAttributes(AttributeSet attrs, int defStyleAttr) {
        super.loadFromAttributes(attrs, defStyleAttr);

        TintTypedArray a = TintTypedArray.obtainStyledAttributes(mView.getContext(), attrs,
                R.styleable.AppCompatSeekBar, defStyleAttr, 0);
        mThumbResId = a.getResourceId(R.styleable.AppCompatSeekBar_android_thumb, INVALID_ID);
//        final Drawable drawable = a.getDrawableIfKnown(R.styleable.AppCompatSeekBar_android_thumb);
//        if (drawable != null) {
//            mView.setThumb(drawable);
//        }

//        mTickMarkResId = a.getResourceId(R.styleable.AppCompatSeekBar_tickMark, INVALID_ID);
//        final Drawable tickMark = a.getDrawable(R.styleable.AppCompatSeekBar_tickMark);
//        setTickMark(tickMark);

//        if (a.hasValue(R.styleable.AppCompatSeekBar_tickMarkTintMode)) {
//            mTickMarkTintMode = DrawableUtils.parseTintMode(a.getInt(
//                    R.styleable.AppCompatSeekBar_tickMarkTintMode, -1), mTickMarkTintMode);
//            mHasTickMarkTintMode = true;
//        }

//        if (a.hasValue(R.styleable.AppCompatSeekBar_tickMarkTint)) {
//            mTickMarkTintList = a.getColorStateList(R.styleable.AppCompatSeekBar_tickMarkTint);
//            mHasTickMarkTint = true;
//        }

        a.recycle();

//        applyTickMarkTint();
        applySkin();
    }
 
开发者ID:wutongke,项目名称:AndroidSkinAnimator,代码行数:33,代码来源:SkinCompatSeekBarHelper.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EventException类代码示例发布时间:2022-05-21
下一篇:
Java EtchedBorderUIResource类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap