How to get a particular row in listview to perform its own operation?
<p>I am new to android programming. I need some help here. I have used <a href="http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/" rel="nofollow">this</a> site example on creating a listview. What I want to achieve is when the user clicks a particular row, the row clicked will perform its respective action. (Eg. When clicked row 1 will show a toast. When clicked row 2 will direct the user to another new view, etc.)</p>

<p>I have set a OnItemClickListener to the listview but am lost on how to do it. Any help will be appreciated. Thanks!
Below is my code:</p>

<pre><code>    .......
    final ListView list = new ListView(this);

    list.setOnItemClickListener(new OnItemClickListener(){

    @Override
    public void onItemClick(Adapter&lt;?&gt; arg0, View v, int i, long l){

    // At implementation

     }
    });
    .......
</code></pre>
