Fb profile pic not coming with a better quality
<p>I have used the following code, able to get the image but when I am trying to put it on Layout background(Linear Layout), the image quality gets reduced and it shows a blurred image.</p>

<pre><code>URL img_value = null;

    try {
        img_value = new URL("http://graph.facebook.com/"+userId+"/picture?type=large");

    } catch (MalformedURLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    Bitmap mIcon1 = null;
    try {
        BitmapFactory.Options opt=new BitmapFactory.Options(); 
        opt.inSampleSize=1;
        // mIcon1 = BitmapFactory.decodeFile(pathoffile,opt);

        mIcon1 = BitmapFactory.decodeStream(img_value.openConnection().getInputStream(),null,opt);
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    ll=(LinearLayout) findViewById(R.id.ll);
    BitmapDrawable background = new BitmapDrawable(mIcon1);
    ll.setBackgroundDrawable(background);
</code></pre>
