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


Java TintTypedArray.getFloat方法代码示例

本文整理汇总了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();
}
 
开发者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: 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

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

示例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();
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:32,代码来源:CollapsingTextHelper.java

示例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();
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:32,代码来源:CollapsingTextHelper.java

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

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


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