title: where to put the arraylist.add method
body: <p>MainActivity.java  @override onPostExecute method</p>
  
  <pre><code> TextView tv = (TextView) findViewById(R.id.textView);
                  tv.setText(moviesArray.get(0).getTitle());
  
                  ImageView iv = (ImageView) findViewById(R.id.imgView);
                  String imageUrl= "http://www.learn2crack.com/wp-content/uploads/2014/04/node-cover-720x340.png";
  
                  Bitmap bitmap = GetImageFromURL.getBitmap(imageUrl);
                  iv.setImageBitmap(bitmap);
  </code></pre>
  
  <p>GetImageFromURL.java</p>
  
  <pre><code>  public class GetImageFromURL {
  
  
          public static Bitmap getBitmap(String imgUrl){
              Bitmap b = null;
              try {
  
                  URL url = new URL(imgUrl);
                  HttpURLConnection connection = (HttpURLConnection) url.openConnection();
                  connection.setDoInput(true);
                  connection.connect();
                  InputStream is = connection.getInputStream();
                   b = BitmapFactory.decodeStream(is);
  
              }catch (Exception e){
  
              }
  
              return b;
          }
      }
  </code></pre>
  
  <p>activity_main.xml</p>
  
  <pre><code>&lt;TextView
          android:id="@+id/textView"
          android:background="#00ff00"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"/&gt;
  
      &lt;ImageView
          android:id="@+id/imgView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/im"/&gt;
  </code></pre>
  
  <p>I want to display images from an url. But I dont know why the image not displaying and no error occurs. pls help!</p>