title: How to insert Bitmap into HashMap
body: <p>Well, I've been trying to insert images from the the Web into a Listview. When I use images from drawable file, inserting "R.drawable.paris (foto file name)", everything goes ok. But when I try to use a Bitmap object, the image just do not appear on the screen. Anybody could tell me what I'm doing wrong?</p>
  
  <pre><code>public class TesHashBitActivity extends Activity {
      /** Called when the activity is first created. */
  
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.main);
  
  
          ListView listCities = (ListView)findViewById(R.id.citylist);
  
          Bitmap photo = BitmapFactory.decodeResource(getResources(), R.drawable.img1);
          ImageView img = (ImageView)findViewById(R.id.imagedisplay);
          img.setImageBitmap(photo);
  
          ArrayList&lt;HashMap&lt;String, Object&gt;&gt; citiesmap  =  new ArrayList&lt;HashMap&lt;String, Object&gt;&gt;();
  
          HashMap&lt;String, Object&gt; citmap = new HashMap&lt;String, Object&gt;();
  
          citmap.put("Photo", photo);
          citmap.put("Nation", "France");
          citiesmap.add(citmap);
  
  
          SimpleAdapter sadapt = new SimpleAdapter(this, citiesmap, R.layout.lines, new String[] {"Photo","Nation"}, new int[] {R.id.photoimg,R.id.contentline});
  
          listCities.setAdapter(sadapt);
          }
  }
  </code></pre>