title: Checking imageview resource on actionlistener rather than the id of the imageview
body: <p>I have 16 imageview, each set to onBtnClick as a listner, inside this method it checks whether the imageview id corresponds to a specific id, I need to change this so it checks the image resource inside the imageview, e.g.</p>
  
  <pre><code>public void onBtnClicked(View v)
  {
  
    if( v.getId() == R.id.img1 )
    {
        Intent guess = new Intent(this, com.Logo_Master.Guesslogo.class);
        guess.putExtra("image","img1");
        startActivity(guess);
    }
  }
  </code></pre>
  
  <p>needs to be something like:</p>
  
  <pre><code>public void onBtnClicked(View v)
  {
  
    if( v.getId() == R.drawable.img1 )
    {
        Intent guess = new Intent(this, com.Logo_Master.Guesslogo.class);
        guess.putExtra("image","img1");
        startActivity(guess);
    }
  }
  </code></pre>
  
  <p>or something similar.....so it checks the image inside the imageview rather than the imageview......</p>
  
  <p>Thank you.</p>
  
  <p>/<em>EDIT</em>/</p>
  
  <pre><code>Random random = new Random( System.currentTimeMillis() );
      List&lt;Integer&gt; generated = new ArrayList&lt;Integer&gt;();
      for (int i = 0; i &lt; imageViews.length; i++) {
  
          int v = imageViews[i];
          int next = random.nextInt( 16 );
          if ( !generated.contains( next ) ) {
              generated.add( next );
              ImageView iv = (ImageView) findViewById( v );
              iv.setImageResource( images[next] );
              Object tag = (Object) new Integer(getImageName(this, String.valueOf(images[next])));
              iv.setTag(tag);
          }
          else {
              i--;
          }
      }
  
  public static int getImageId(Context context, String imageName) {
  return context.getResources().getIdentifier("id/" + imageName + "guess", null, context.getPackageName());
  }
  
  
  public static int getImageName(Context context, String imageName) 
  {
  return context.getResources().getIdentifier("drawable/" + imageName + "guess", null,     context.getPackageName());
  }
  </code></pre>