Not sure why getting Duplicate method onClick(View)
<p>I've got one activity
here is what I am trying do. When app starts an image is displayed. When the image is clicked the next image is displayed. 
I've got it all setup with main.xml and imageview.
The app builds and runs and displays the first image no problem.
Now trying to setup onclick for the image so the next image will be displayed. I've added android:onClick="onClick" to the image vew in main.xml.
I am using (this) for setOnClickListner and I implemented View.onClickListener for the class but the switch case I setup I get duplicate method for onClick(View v) and I'm not sure why. </p>

<p>Also trying to figure out the findViewById I think the way I have it image1 will always be displayed.</p>

<p>getting error on line public void onClick(View v) that it is a duplicate method.</p>

<p>Here is the code I have. Thanks for any assistance on this. </p>

<p>main.xml is a linear layout not sure  that matters. </p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"&gt;

&lt;ImageView
    android:id="@+id/imageView1"
    android:src="@drawable/bear"        
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:onClick="onClick"
    android:contentDescription="@string/desc"/&gt;

&lt;ImageView
    android:id="@+id/imageView2"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:src="@drawable/bear_n"
    android:onClick="onClick"
    android:contentDescription="@string/desc" /&gt;
</code></pre>

<p></p>

<p>This is the .java file.</p>

<pre><code>import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;


public class VTFCActivity extends Activity implements View.OnClickListener{

ImageView image;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    image = (ImageView) findViewById(R.id.imageView1);
    ImageView image1 = (ImageView) findViewById(R.id.imageView1);
    ImageView image2 = (ImageView) findViewById(R.id.imageView2);

    image1.setOnClickListener(this);
    image2.setOnClickListener(this);

}
public void onClick(View v) {
    switch (v.getId()){

    case R.id.imageView1:
        image.setImageResource(R.drawable.bear);
        break;
    case R.id.imageView2:
        image.setImageResource(R.drawable.bear_n);
        break;          
    }
}
</code></pre>
