Onitemlistclick not working?
<p>I am a beginner in android...i have changed 
<strong>MainActivity extends listActivity to MainActivity extends Activity</strong> for searching purpose in list items...and now on clicking particular item it's not working...i know i am not able to call activity onClick Items..but i dont know how to fix it..plz help</p>

<p>Thanks in advance.</p>

<pre><code>**MainActivity.java**


import android.os.Bundle;
import java.util.ArrayList;
import java.util.HashMap;

import android.app.Activity;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;

import com.google.android.youtube.player.YouTubeIntents;
import com.bollywoodmovies.MainActivity;
import com.bollywoodmovies.R;
import android.content.Intent;
import android.view.Menu;
import android.view.View;






public class MainActivity extends Activity {
    final int Kamaal_Dhamaal_Malamaal=0;
    final int Aatma = 1; //should be equal to the index in your array.
    final int Deewana_Main_Deewana=2;

     // List view
    private ListView lv;

    // Listview Adapter
    ArrayAdapter&lt;String&gt; adapter;

    // Search EditText
    EditText inputSearch;


    // ArrayList for Listview
    ArrayList&lt;HashMap&lt;String, String&gt;&gt; productList; 





    String menu[] = {"Kamaal Dhamaal Malamaal (2013)","Aatma (2013)"};

 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);
        lv = (ListView) findViewById(android.R.id.list);

        //ListView.setOnItemClickListener(listener);
        inputSearch = (EditText) findViewById(R.id.inputSearch);

        // Adding items to listview
        //adapter = new ArrayAdapter&lt;String&gt;(this, R.layout.list_item, R.id.product_name, menu);
        lv.setAdapter(new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_1 , menu));
inputSearch.addTextChangedListener(new TextWatcher() {

            @Override
            public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) {
                // When user changed the Text
                MainActivity.this.adapter.getFilter().filter(cs);   
            }

            @Override
            public void beforeTextChanged(CharSequence arg0, int arg1, int arg2,
                    int arg3) {
                // TODO Auto-generated method stub

            }

            @Override
            public void afterTextChanged(Editable arg0) {
                // TODO Auto-generated method stub                          
            }
        });
    }    

@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    protected void onItemListClick(ListView l, View v, int position, long id) {

     /* CheckedTextView selectedItem = (CheckedTextView) v;
       boolean isChecked = selectedItem.isChecked();
       Log.e("TAG","item clicked position = " + position + " isChecked = " + isChecked);
**/
        Intent intent;
        switch (position) {
        case Kamaal_Dhamaal_Malamaal:
            Toast.makeText(getBaseContext(),"Working", Toast.LENGTH_SHORT).show();
            intent = YouTubeIntents.createPlayVideoIntentWithOptions(this,"jPWqTYZgF6o", true, false);
            startActivity(intent);
           break;
        case Aatma:
            intent = YouTubeIntents.createPlayVideoIntentWithOptions(this,"2-34yu4615U", true, false);
            startActivity(intent);



        default:
            break;
        }

    }

}
</code></pre>
