ResUtil.java 文件源码

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

项目:UIKit-ViewBlock 作者:
public static int[] getResourcesIdArray(@ArrayRes int id) {
    TypedArray typedArray = mApplication.getResources().obtainTypedArray(id);
    int length = typedArray.length();
    int[] resArray = new int[length];
    for (int i = 0; i < length; i++) {
        int resourceId = typedArray.getResourceId(i, 0);
        resArray[i] = resourceId;
    }
    typedArray.recycle();
    return resArray;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号