Android: Get the image source name of an ImageView to display on a TextView
<p>Hi I am new into android development and I am having trouble into this one. I wanted to display the src name of my <code>imageView</code> on a <code>textView</code> when I click a certain Image.
To understand much further here is my hardcode for the <code>image clickListener</code> (hope someone can also help me to improve my coding).</p>

<pre><code>    int ctr = 0;
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.play);

        //DECLARE CLICK LISTENERS ON OBJECTS
        ImageView ImageView1 = (ImageView)findViewById(R.id.imageView1);
        ImageView1.setOnClickListener(this);
        ImageView ImageView2 = (ImageView)findViewById(R.id.imageView2);
        ImageView2.setOnClickListener(this);
        ...

public void onClick(View v) {
        //CHANGE TEXT VIEW TEXT BASED ON THE CTR VALUE
        TextView TextView1 =(TextView)findViewById(R.id.textView1); 

        //I WANT TO CHANGE THIS ONE TO DISPLAY SRC INSTEAD OF THE CTR VALUE
        TextView1.setText(Integer.toString(ctr)); 
}
</code></pre>

<p>There, instead of displaying the ctr value I wanted to display the src name of whatever image I click between the two images I set. I believe it is possible. Thanks.</p>
