title: app is slow with images in android
body: <p>I am doing a app on images to show them in GridView, i am fetching 20 images from server. Resolution of the each image is 720*540.I used  JSON parsing to fetch url and used below code to convert into Bitmap in order to set images.</p>
  
  <pre><code>public static Bitmap loadImageFromUrl(String url) {
      InputStream inputStream;Bitmap b;
      try {
          inputStream = (InputStream) new URL(url).getContent();
          BitmapFactory.Options bpo=  new BitmapFactory.Options();
          if(bpo.outWidth&gt;500) {
              bpo.inSampleSize=8;
              b=BitmapFactory.decodeStream(inputStream, null,bpo );
          } else {
              bpo.inSampleSize=2;
              b=BitmapFactory.decodeStream(inputStream, null,bpo );
          }
          return  b;
      } catch (IOException e) {
          throw new RuntimeException(e);
      }
  }
  </code></pre>
  
  <p>my app is working fine but it is taking too much time to load the images. So that my app became slow.  Should i decrease the resolution of images?</p>
  
  <p>how to come out of the issue?</p>