title: view.getId() returning wrong id in OnItemClickListener
body: <p>In my app i have a Gallery with some images in it. When the user selects an image I want to somehow retrieve the id of the selected image.</p>
  
  <p>The int that is returned by getId() is -1. Why am I not getting the system id for the image that was selected?</p>
  
  <pre><code>gallery.setOnItemClickListener(new OnItemClickListener() {
              @SuppressWarnings("rawtypes")
              @Override
              public void onItemClick(AdapterView parent, View v, int position, long id) {
                  int imageId = v.getId();
              }
          });
  </code></pre>
  
  <p>Thanks!</p>