use of android.support.v7.widget.TintTypedArray in project Android-skin-support by ximsfei.
the class SkinMaterialTextInputLayout method loadCounterTextColorResFromAttributes.
private void loadCounterTextColorResFromAttributes(@StyleRes int resId) {
if (resId != INVALID_ID) {
TintTypedArray counterTA = TintTypedArray.obtainStyledAttributes(getContext(), resId, skin.support.R.styleable.SkinTextAppearance);
if (counterTA.hasValue(skin.support.R.styleable.SkinTextAppearance_android_textColor)) {
mCounterTextColorResId = counterTA.getResourceId(skin.support.R.styleable.SkinTextAppearance_android_textColor, INVALID_ID);
SkinLog.d(TAG, "mCounterTextColorResId name = " + getResources().getResourceName(mCounterTextColorResId));
}
counterTA.recycle();
}
applyCounterTextColorResource();
}
use of android.support.v7.widget.TintTypedArray in project Android-skin-support by ximsfei.
the class SkinCompatBackgroundHelper method loadFromAttributes.
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();
}
use of android.support.v7.widget.TintTypedArray in project Android-skin-support by ximsfei.
the class SkinCompatImageHelper method loadFromAttributes.
public void loadFromAttributes(AttributeSet attrs, int defStyleAttr) {
TintTypedArray a = null;
try {
a = TintTypedArray.obtainStyledAttributes(mView.getContext(), attrs, R.styleable.SkinCompatImageView, defStyleAttr, 0);
mSrcResId = a.getResourceId(R.styleable.SkinCompatImageView_android_src, INVALID_ID);
} finally {
if (a != null) {
a.recycle();
}
}
applySkin();
}
use of android.support.v7.widget.TintTypedArray in project Android-skin-support by ximsfei.
the class SkinCompatProgressBarHelper method loadFromAttributes.
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();
}
use of android.support.v7.widget.TintTypedArray in project Shuttle by timusus.
the class CustomCollapsingTextHelper method setExpandedTextAppearance.
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)) {
mExpandedTitleColor = 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();
}
Aggregations