MaterialResources.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:material-components-android 作者:
/**
 * Returns a TextAppearanceSpan object from the given attributes.
 *
 * <p>You only need this if you are drawing text manually. Normally, TextView takes care of this.
 */
@Nullable
public static TextAppearance getTextAppearance(
    Context context, TypedArray attributes, @StyleableRes int index) {
  if (attributes.hasValue(index)) {
    int resourceId = attributes.getResourceId(index, 0);
    if (resourceId != 0) {
      return new TextAppearance(context, resourceId);
    }
  }
  return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号