title: OnCreateContextMenu and ListView items
body: <p>I have a LisView with several items. To this I've connected an OnItemClickListener (as an inner class), like this:</p>
  
  <pre><code>lv.setOnItemClickListener(new OnItemClickListener() {
      public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
      Toast.makeText(ShoppingListApp02Activity.this, "List item selected:" +  
      items.get(position).getId(), Toast.LENGTH_LONG).show();
      }
  });
  </code></pre>
  
  <p>As is obvious, selecting an entriy displays elements of the object of that entry, in this example the selected Item object's ID (not the list ID, but the objects ID, set when creating the ArrayList items). This works nicely, and enables me to do anything I want with the selected item(s).</p>
  
  <p>Now I'd like to also have a "long-click" listener her, which opens a context menu for the selected ListView item. How do I do that? I've been able to attach an onCreateContextMenu listener to the ListView, but I don't see how I can get the elements of the ArrayList as with the onItemClickListener?</p>
  
  <p>Here's what I've got:</p>
  
  <pre><code>public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {  
      menu.add(0, v.getId(), 0, "Something");
      menu.add(0, v.getId(), 0, "Something else");  
  }
  </code></pre>
  
  <p>Since OnCreateConextMenu takes different parameters than the OnItemClickListener, how to I access the ArrayList's elements like in the OnItemClickListener?</p>