Bitmapbitmap=null;
try {
bitmap = BitmapFactory.decodeFile(getCacheDir().toString() +"/" +photoName);
}catch (OutOfMemoryError e){
}
if(bitmap==null){
}else {
view.setImageBitmap(bitmap);
}
}
Bitmapbitmap=null;
try {
bitmap = BitmapFactory.decodeFile(getCacheDir().toString() +"/" +photoName);
}catch (OutOfMemoryError e){
}
if(bitmap==null){
}else {
view.setImageBitmap(bitmap);
}
}
本文标题:使用bitmap一定要捕捉OutOfMemoryError
本文链接:https://www.haomeiwen.com/subject/zsojaxtx.html
网友评论