android_listview
<p>I want to open a new activity when an item is clicked in listview. How to do this.?
Here is the code :</p>

<pre><code>package com.example.c_progams;
</code></pre>

<p>public class Second_listview extends ListActivity{</p>

<pre><code>@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    setContentView(R.layout.second_listview);

    setListAdapter (new ArrayAdapter&lt;String&gt;(this, R.layout.second_listview, type));
    ListView list = getListView();
    list.setTextFilterEnabled(true);
    list.setOnItemClickListener(new OnItemClickListener(){

        @Override
        public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
                long arg3) {
            // TODO Auto-generated method stub


        }



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

<p>static final String[] type = new String[]{</p>

<pre><code>"Array", "Operator Overloading", "Inheritence", "Strings", "Pointers", "Files", "Misclaneous" 
</code></pre>

<p>};</p>

<p>}</p>
