本文整理汇总了Java中android.support.v7.widget.TintTypedArray.getFloat方法的典型用法代码示例。如果您正苦于以下问题:Java TintTypedArray.getFloat方法的具体用法?Java TintTypedArray.getFloat怎么用?Java TintTypedArray.getFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v7.widget.TintTypedArray
的用法示例。
在下文中一共展示了TintTypedArray.getFloat方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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();
}
示例3: 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();
}
示例4: 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();
}
示例5: setCollapsedTextAppearance
import android.support.v7.widget.TintTypedArray; //导入方法依赖的package包/类
void setCollapsedTextAppearance(int resId) {
TintTypedArray a =
TintTypedArray.obtainStyledAttributes(
view.getContext(), resId, android.support.v7.appcompat.R.styleable.TextAppearance);
if (a.hasValue(android.support.v7.appcompat.R.styleable.TextAppearance_android_textColor)) {
collapsedTextColor =
a.getColorStateList(
android.support.v7.appcompat.R.styleable.TextAppearance_android_textColor);
}
if (a.hasValue(android.support.v7.appcompat.R.styleable.TextAppearance_android_textSize)) {
collapsedTextSize =
a.getDimensionPixelSize(
android.support.v7.appcompat.R.styleable.TextAppearance_android_textSize,
(int) collapsedTextSize);
}
collapsedShadowColor =
a.getInt(android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowColor, 0);
collapsedShadowDx =
a.getFloat(android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowDx, 0);
collapsedShadowDy =
a.getFloat(android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowDy, 0);
collapsedShadowRadius =
a.getFloat(android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowRadius, 0);
a.recycle();
if (Build.VERSION.SDK_INT >= 16) {
collapsedTypeface = readFontFamilyTypeface(resId);
}
recalculate();
}
示例6: setExpandedTextAppearance
import android.support.v7.widget.TintTypedArray; //导入方法依赖的package包/类
void setExpandedTextAppearance(int resId) {
TintTypedArray a =
TintTypedArray.obtainStyledAttributes(
view.getContext(), resId, android.support.v7.appcompat.R.styleable.TextAppearance);
if (a.hasValue(android.support.v7.appcompat.R.styleable.TextAppearance_android_textColor)) {
expandedTextColor =
a.getColorStateList(
android.support.v7.appcompat.R.styleable.TextAppearance_android_textColor);
}
if (a.hasValue(android.support.v7.appcompat.R.styleable.TextAppearance_android_textSize)) {
expandedTextSize =
a.getDimensionPixelSize(
android.support.v7.appcompat.R.styleable.TextAppearance_android_textSize,
(int) expandedTextSize);
}
expandedShadowColor =
a.getInt(android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowColor, 0);
expandedShadowDx =
a.getFloat(android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowDx, 0);
expandedShadowDy =
a.getFloat(android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowDy, 0);
expandedShadowRadius =
a.getFloat(android.support.v7.appcompat.R.styleable.TextAppearance_android_shadowRadius, 0);
a.recycle();
if (Build.VERSION.SDK_INT >= 16) {
expandedTypeface = readFontFamilyTypeface(resId);
}
recalculate();
}
示例7: setCollapsedTextAppearance
import android.support.v7.widget.TintTypedArray; //导入方法依赖的package包/类
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();
}
示例8: setExpandedTextAppearance
import android.support.v7.widget.TintTypedArray; //导入方法依赖的package包/类
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();
}