/**
* Get drawable
*
* @param context context
* @param resId drawable id
* @return drawable
*/
static public Drawable getDrawable(@NonNull final Context context, int resId)
{
final Resources resources = context.getResources();
Drawable drawable;
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP)
{
final Resources.Theme theme = context.getTheme();
drawable = resources.getDrawable(resId, theme);
}
else
{
drawable = resources.getDrawable(resId);
}
return drawable;
}
Utils.java 文件源码
java
阅读 42
收藏 0
点赞 0
评论 0
项目:TreebolicLib
作者:
评论列表
文章目录