OOM exception while loading Images to imageviews in android
<p>I am using listview to display images(which are of large size),I got the urls of images from facebook graph api.</p>

<p>I am using (Imageloader) class to display images,</p>

<pre><code>Here is decodefile(),in ImageLoader class-------&gt;

    private Bitmap decodeFile(File f){
        try {
            //decode image size
            BitmapFactory.Options o = new BitmapFactory.Options();
            o.inJustDecodeBounds = true;
            FileInputStream stream1=new FileInputStream(f);
            BitmapFactory.decodeStream(stream1,null,o);
            stream1.close();
//            final int REQUIRED_SIZE=250;
            //Find the correct scale value. It should be the power of 2.
            final int REQUIRED_SIZE=Wall.width;
            final int REQUIRED_SIZE1=Wall.height;
            int width_tmp=o.outWidth, height_tmp=o.outHeight;
            int scale=1;
            while(true){
                if(width_tmp/2&lt;REQUIRED_SIZE || height_tmp/2&lt;REQUIRED_SIZE1)
                    break;
                width_tmp/=2;
                height_tmp/=2;
                scale*=2;
            }

            //decode with inSampleSize
            BitmapFactory.Options o2 = new BitmapFactory.Options();
            o2.inSampleSize=scale;
            FileInputStream stream2=new FileInputStream(f);
            Bitmap bitmap=BitmapFactory.decodeStream(stream2, null, o2);
            stream2.close();
            return bitmap;
        } catch (FileNotFoundException e) {
        } 
        catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    } 
</code></pre>

<p>But I am continuesly getting OOM exception. </p>

<p>I studied different stackoverflow postings,but didnt find any solution.And I Also studied 
 <a href="http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html" rel="nofollow">http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html</a>,
 but didnt understand anything.</p>

<pre><code>Is it possible to display large images in Listview in android?

How the Facebook apps can able to manage the large images in android?

please provide suggestions on this issue.
</code></pre>
