title: How to Display Images From JSON in Android
body: <p><strong>I got json data with image url. Now I want to get images from that image url from json data. So, how can i get image from that image url? Any suggestion for this?</strong></p>
  
  <p>I get following image url from json.</p>
  
  <pre><code>[{....,"image":"xyz.net/abc/img/p/9/0/9/7/9097-tonytheme_product.jpg",....},{....}]
  </code></pre>
  
  <p>I want to display above image url on dynamically created imageview. 
  I have following method for dynamially created imageview.</p>
  
  <pre><code>public void addImagesToView() {
      StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
      StrictMode.setThreadPolicy(policy);
      Log.i("ArrayList In Image","" +arraylist);
      for (int i = 0; i &lt; arraylist.size(); i++) {
  
          imageButton = new ImageView(this);
  
          LinearLayout.LayoutParams params = new LayoutParams(
                  LinearLayout.LayoutParams.WRAP_CONTENT,
                  LinearLayout.LayoutParams.WRAP_CONTENT);
          // for setting image margin and spacing(left,top,right,bottom)
          params.setMargins(60, 20, 5, 5);
          imageButton.setLayoutParams(params);
          horizontalOuterLayouthome.addView(imageButton);
  
          // horizontalOuterLayouthome.setVisibility(View.INVISIBLE);
  
      }
  }
  </code></pre>