title: How to Show selected data in Toast?
body: <p>I am using this following code to show data, I want to show the data of list item in Toast when click on listItem in my case does not show , please help .Thanks</p>
  
  <pre><code> public class MainActivity extends ListActivity {
    protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          ArrayList&lt;Map&lt;String, String&gt;&gt; list = buildData();
          String[] from = { "name", "purpose" };
          int[] to = { android.R.id.text1, android.R.id.text2 };
  
          SimpleAdapter adapter = new SimpleAdapter(this, list,
              android.R.layout.simple_list_item_2, from, to);
          setListAdapter(adapter);
        }
  
        private ArrayList&lt;Map&lt;String, String&gt;&gt; buildData() {
          ArrayList&lt;Map&lt;String, String&gt;&gt; list = new ArrayList&lt;Map&lt;String, String&gt;&gt;();
          list.add(putData("Android", "Mobile"));
          list.add(putData("Windows7", "Windows7"));
          list.add(putData("iPhone", "iPhone"));
          return list;
        }
  
        private HashMap&lt;String, String&gt; putData(String name, String purpose) {
          HashMap&lt;String, String&gt; item = new HashMap&lt;String, String&gt;();
          item.put("name", name);
          item.put("purpose", purpose);
          return item;
        }
  
      @Override
      protected void onListItemClick(ListView l, View v, int position, long id) {
          // TODO Auto-generated method stub
          super.onListItemClick(l, v, position, id);
  
           Toast.makeText(getApplicationContext(), ???????????????????????????,
                    Toast.LENGTH_SHORT).show();
      }
  
  
  
      }
  </code></pre>