38. Android 反射资源工具ReflectionUtil
工具代码
ReflectionUtil
public class ReflectionUtil {
public enum ResourcesType {
styleable,
style,
string,
mipmap,
menu,
layout,
integer,
id,
drawable,
dimen,
color,
bool,
attr,
anim
}
/**
* 根据名字,反射取得资源
*
* @param context context
* @param name resources name
* @param type enum of ResourcesType
* @return resources id
*/

本文介绍了Android开发中的一款实用工具ReflectionUtil,用于通过反射操作资源。文章包含工具代码展示及具体的使用示例,帮助开发者理解和应用该工具。
最低0.47元/天 解锁文章
624

被折叠的 条评论
为什么被折叠?



