简单三行:
Resources res=getResources();
int pic_id = res.getIdentifier(Picname,"drawable",getPackageName());
Bitmap bp = BitmapFactory. decodeResource (res,pic_id);
Picname就是图片名,不需要文件名后缀
2024-02-13 21:09:22
简单三行:
Resources res=getResources();
int pic_id = res.getIdentifier(Picname,"drawable",getPackageName());
Bitmap bp = BitmapFactory. decodeResource (res,pic_id);
Picname就是图片名,不需要文件名后缀
下一篇:linux系统磁盘不足处理方法