ResUtil.java 文件源码

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

项目:Cable-Android 作者:
public static int[] getResourceIds(Context c, @ArrayRes int array) {
  final TypedArray typedArray  = c.getResources().obtainTypedArray(array);
  final int[]      resourceIds = new int[typedArray.length()];
  for (int i = 0; i < typedArray.length(); i++) {
    resourceIds[i] = typedArray.getResourceId(i, 0);
  }
  typedArray.recycle();
  return resourceIds;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号