Getting text from a Listview
<p>I have a ListView that gets filled from a cursor (using rawQuery) that I need to get the text of the selected item from on click.</p>

<pre><code>protected void onListItemClick(ListView l, View v, int position, long id) {
    super.onListItemClick(l, v, position, id);
    Intent mViewChaptersIntent = new Intent(this, ViewWeb.class);
    String s = ((TextView) l.getItemAtPosition(position)).getText().toString(); // Tried this, didn't work.
    mViewChaptersIntent.putExtra("extension", s);
    mViewChaptersIntent.putExtra("itmClicked", String.format("%d", id));
    startActivity(mViewChaptersIntent);
}
</code></pre>

<p>But I'm not sure about the right way to do it. The getItemAtPosition that I've seen in other posts doesn't seem to work...</p>
