title: Serializable object to Arraylist of Hashmap
body: <p>I am developing an android application, where I display all the names of the contact in a Listview.</p>
  
  <p>Onclick of the contact Listview,I need to display the respective numbers of that Contact in another Listview.</p>
  
  <p>The problem here is, I bundled all the numbers and sent it another activity and also received the bundle, but the received bundle is Serializable object.</p>
  
  <p>So, to dispaly in the Listview I need to convert it to the Arraylist of Hashmap.
  How can I do this? </p>
  
  <p>Here is the code:</p>
  
  <p>Sending Activity:</p>
  
  <pre><code>HashMap&lt;String, String&gt; Numbermap = new HashMap&lt;String, String&gt;();
  
  Numbermap.put("numb",number);
  Numbermap.put("type",type);
  
  NumberList.add(Numbermap);
  
  Intent intent = new Intent (ContactNames.this,ContactsPhoneNumbers.class);
  
  intent.putExtra("map", NumberList);
  
  
  startActivity(intent);
  </code></pre>
  
  <p>Receiving Activity:</p>
  
  <pre><code>    Serializable Numbermap = new HashMap&lt;String, String&gt;();
  
      //  contNum = (TextView)findViewById(R.id.ContactNumber);
  
      Bundle bundle = getIntent().getExtras();
  
      Intent intent = getIntent();
  
      if(bundle!=null)
      {
          Numbermap = bundle.getSerializable("map");
      }
  </code></pre>