title: How I can start a Activity if I click in A Item in a ListView
body: <p>I write an Android Application and I use a ListView and it works fine, but if I want to click on an Item then I want to start a second Activity with the selected Item. For this I want to use OnItemClick but it doesn't work :(</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>package de.linde.listview;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View; 
  import android.widget.AdapterView;
  import android.widget.ArrayAdapter;
  import android.widget.ListAdapter;
  import android.widget.ListView;
  import android.widget.AdapterView.OnItemClickListener;
  
  public class MainActivity&lt;T&gt; extends Activity {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          List valueList = new ArrayList&lt;String&gt;(); 
  
          for(int i=0;i&lt;10;i++)
          {
              valueList.add("value" + i); 
          }
  
          ListAdapter adapter = new ArrayAdapter&lt;String&gt;(getApplicationContext(),android.R.layout.simple_list_item_1,valueList); 
  
          final ListView lv = (ListView)findViewById(R.id.listview1);
          lv.setAdapter(adapter); 
  
          lv.setOnItemClickListener(new OnItemClickListener() {   //&lt;-- Error1
  
              @Override
              public void OnItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long arg3){  //&lt;-- Error 2
  
                  Intent intent = new Intent();
                  intent.setClassName(getPackageName(), getPackageName() + ".Show_Activity"); 
                  intent.putExtra("selected",lv.getAdapter().getItem(arg2).toString()); 
                  startActivity(intent); 
  
              }
  
          });
  
  
      }
  
  }
  </code></pre>
  
  <p>Here my Show_Activity.java</p>
  
  <pre><code>package de.linde.listview;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.content.Intent;
  import android.widget.TextView;
  
  public class Show_Activity extends Activity {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.anzeige);
  
          Intent intent = getIntent();
  
          ((TextView)(findViewById(R.id.textView1))).setText("Es wurde" + intent.getStringExtra("selected") + " gewählt!"); 
      }
  
  }
  </code></pre>
  
  <p>I get the Error 1:</p>
  
  <blockquote>
    <p>The type new AdapterView.OnItemClickListener(){} must implement the
    inherited abstract method
    AdapterView.OnItemClickListener.onItemClick(AdapterView, View, int,
    long)</p>
  </blockquote>
  
  <p>I get the Error 2:</p>
  
  <blockquote>
    <p>The method OnItemClick(AdapterView, View, int, long) of type new
    AdapterView.OnItemClickListener(){} must override a superclass method</p>
  </blockquote>
  
  <p>What did I make wrong?</p>