Bitmap OutOfMemoryError

后端 未结 2 395
时光取名叫无心
时光取名叫无心 2021-01-25 23:11

I have question about this error.

I make favicon parser from URLs. I do this like:

public class GrabIconsFromWebPage {
public static String replaceUrl(S         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-26 00:01

    I think, you would use universal image loader

    The method as given snippet

    // Load image, decode it to Bitmap and return Bitmap synchronously 
    ImageSize targetSize = new ImageSize(80, 50); 
    // result Bitmap will be fit to this size
    Bitmap bmp = imageLoader.loadImageSync(imageUri, targetSize, options);
    

    And for out of memory bound you would add a line in manifest file

    
    
    

提交回复
热议问题