将项目res文件夹下的图片资源转化成bitmap

Resources res = context.getResources();
Bitmap bmp= BitmapFactory.decodeResource(res, R.mipmap.flower);

猜你喜欢

转载自blog.csdn.net/github_27263697/article/details/79663215
今日推荐