title: Android: Dealing HashMap.put for image
body: <p>I want to add an image to the listview, how do i do so? The names and type are displaying properly. Currently stuck here. </p>
  
  <pre><code>.//other codes
  .
  .
  try{
          JSONArray arr = new JSONArray(res);
          for(int i=0;i&lt;arr.length();i++){                        
              HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
              JSONObject e = arr.getJSONObject(i);
  
              map.put("placeID", ""+ e.getString("placeID"));
              map.put("placeName",""+ e.getString("placeName"));
              map.put("placeType", ""+ e.getString("placeType"));
              map.put("image", R.drawable.ball_green);
  
              mylist.add(map);            
          }       
      }catch(JSONException e)        {
           Log.e("log_tag", "Error parsing data "+e.toString());
      }
  
      ListAdapter adapter = new SimpleAdapter(this, mylist , R.layout.places, 
                      new String[] { "placeName", "placeType" }, 
                      new int[] { R.id.placeName, R.id.placeType });
  .
  .
  .//other codes
  </code></pre>
  
  <p>I want the image appropriately like:</p>
  
  <p><img src="https://i.stack.imgur.com/nHUSG.png" alt="ListView"></p>