title: Converting url to image in HashMap
body: <p>The value of the key <code>"KEY_PHOTO"</code> in each <code>HashMap</code> holds an url to an image that I need to put inside <code>R.id.imageView</code>, how can I convert url to <code>Bitmap</code>?</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      private static final String TAG = "TAG";
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; usersHashMap;
      ListView listView;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
          usersHashMap = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
          listView = (ListView) findViewById(R.id.listView1);
  
          new readJson().execute();
      }
  
  
      class readJson extends AsyncTask&lt;String, Void, String&gt; {
  
          @Override
          protected void onPreExecute() {
  
              super.onPreExecute();
          }
  
          @Override
          protected String doInBackground(String... arg) {
  
  
              JSONParser jParser = new JSONParser();
              JSONObject json = null;
              json = jParser.getJSONFromUrl("link");
  
              try {
                  JSONArray users = json.getJSONArray("users");
                  for (int i = 0; i &lt; users.length(); i++) {
  
                      JSONObject obj = users.getJSONObject(i);
                      HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  
                      map.put("KEY_NAME", obj.getString("name"));
                      map.put("KEY_PHOTO", obj.getString("photo"));
                      map.put("KEY_AGE", obj.getString("age"));
  
                      usersHashMap.add(map);
                  }
  
              } catch (JSONException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
  
              Log.d(TAG, ""+json);
  
              return null;
          }
  
          @Override
          protected void onPostExecute(String result) {
  
              SimpleAdapter adapter = new SimpleAdapter(getApplicationContext(),  usersHashMap, R.layout.list_view,
                      new String[] { "KEY_NAME", "KEY_AGE", "KEY_PHOTO" },  
                      new int[] { R.id.list_headline,R.id.list_info,R.id.imageView }); //set photo url to R.id.imageView
  
              listView.setAdapter(adapter);
  
              super.onPostExecute(result);
  
          }
  
      }
  
  }
  </code></pre>