title: Detecting Which item was Selected From a ListView
body: <p>I am trying to get the title of the song that was selected from my listview but I'm getting a forced close.  Any ideas?</p>
  
  <pre><code>    ArrayList&lt;String&gt;songtitle = new ArrayList&lt;String&gt;();
  
      //This is how i popluated sontitle//
     ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,R.layout.song,songtitle);
      setListAdapter(adapter);
  
   protected void onListIemClick(ListView  , View v, int position, long id){
         super.onListItemClick(c, v, position, id);
          Object o = this.getListAdapter().getItem(position);
      String pen = o.toString();
          Toast.makeText(this, "You have chosen the color: " + " " + songtitle, Toast.LENGTH_LONG).show();
  </code></pre>