title: onItemClickListener(), how to pass clicked item's data?
body: <p>I am using onItemClickListener() with a List. I want to pass name of the item clicked on, and an arbitrary number to next instance of the list. How can this be done?
  Edit: here is the class:</p>
  
  <pre><code>    public class ListViewA extends Activity{
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          ListView lv= (ListView)findViewById(R.id.listview);
  
          // create the grid item mapping
          String[] from = new String[] {"col_1"};
          int[] to = new int[] {R.id.item2};
  
          // prepare the list of all records
          List&lt;HashMap&lt;String, String&gt;&gt; fillMaps = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
          for(int i = 0; i &lt; 10; i++){
              HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
              map.put("col_1", "col_1_item_" + i);
              fillMaps.add(map);
              lv.setOnItemClickListener(onListClick);
          }
  
          // fill in the grid_item layout
          SimpleAdapter adapter = new SimpleAdapter(this, fillMaps, R.layout.grid_item, from, to);
          lv.setAdapter(adapter);
      }
      private AdapterView.OnItemClickListener onListClick=new AdapterView.OnItemClickListener(){
      public void onItemClick(AdapterView&lt;?&gt; parent,View view, int position, long id)
      {
          Intent i=new Intent(ListViewA.this,ListViewA.class);
          startActivity(i);
      }
  
  };
  }
  </code></pre>