/**
* Gets color.
*
* @param context the context
* @param colorRes the color res
* @return the color
*/
@ColorInt
public static int getColor(Context context, @ColorRes int colorRes) {
if (Build.VERSION.SDK_INT < 21) {
//noinspection deprecation
return context.getResources().getColor(colorRes);
} else {
return context.getResources().getColor(colorRes, null);
}
}
CompatUtils.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:MainCalendar
作者:
评论列表
文章目录