title: Android : ImageView getID(); returning integer
body: <p>I've set up an onTouch class to determine when one of my 40 buttons is pressed.</p>
  
  <p>The problem I am facing is determining <em>which</em> button was pressed.</p>
  
  <p>If I use:</p>
  
  <p>int ID = iv.getId();</p>
  
  <p>When I click on button "widgetA1"</p>
  
  <p>I receive the following ID:</p>
  
  <p>2131099684</p>
  
  <p>I would like it to return the string ID "widgetA1"</p>
  
  <p>from:game.xml</p>
  
  <pre><code>&lt;ImageView android:layout_margin="1dip" android:id="@+id/widgetA1" android:src="@drawable/image" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/ImageView&gt;
  </code></pre>
  
  <p>from:game.java</p>
  
  <pre><code>public boolean onTouch(View v, MotionEvent event) {
    ImageView iv = (ImageView)v;
    int ID = iv.getId();
    String strID = new Integer(ID).toString();
    Log.d(TAG,strID);
  
    //.... etc
  
   }
  </code></pre>
  
  <p>+-+-+-+-+-+-</p>
  
  <p>I other wise works fine, it knows what button you are pressing. I am quite new to this Android JAVA. Let me know if you guys can help me.</p>