public int getColor(int resId) {
int originColor = context.getResources().getColor(resId);
if (mResources == null || isDefaultSkin) {
return originColor;
}
String resName = context.getResources().getResourceEntryName(resId);
int trueResId = mResources.getIdentifier(resName, "color", skinPackageName);
int trueColor = 0;
try {
trueColor = mResources.getColor(trueResId);
} catch (NotFoundException e) {
e.printStackTrace();
trueColor = originColor;
}
return trueColor;
}
SkinManager.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:themePlugin
作者:
评论列表
文章目录