Java Android ListView
<p>Hey all,
I have to display a list of items, and when I click on the list item , it has to be displayed in another list. I have created a list view in xml file too. Here is my onListItemClick method, but it force closes.</p>

<pre><code>protected void onListItemClick(ListView l, View v, int position, long id) {
    super.onListItemClick(l, v, position, id);
    Cursor c = q;
    q.moveToPosition(position);
    String newsLinkString = q.getString(q.getColumnIndexOrThrow(NBDBAdapter.NB_LINK));
    TextView linkTV = (TextView) v.findViewById(R.id.rowlink);
    newsLinkString = linkTV.getText().toString();
    if (newsLinkString.startsWith("http://")) {
        Uri uri = Uri.parse(newsLinkString);
        Intent i = new Intent(this, NB.class);
        //  Save ListView position 
        i.putExtra("link",c.getString(c.getColumnIndexOrThrow(NBDBAdapter.NB_LINK)));
        startActivity(i);
    }
}
</code></pre>
