Android Story

[ Android ] Bitmap OutofMemory Exeption Solution

WhiteDuck 2016. 1. 19. 11:56


사이즈 결정하기


//  !------    OutofMemory Exception Solution

final BitmapFactory.Options options = new BitmapFactory.Options();

options.inSampleSize = 8;

//  Solution End  ------- !

Bitmap image = BitmapFactory.decodeFile(list.get(position)[2],options);

imageView.setImageBitmap(image);




참고

http://stackoverflow.com/questions/25719620/how-to-solve-java-lang-outofmemoryerror-trouble-in-android

반응형