title: Preview Image when clicked- Android
body: <p>I'm a novice Android developer. I used the code given at Google's Android developer site and developed the <a href="http://developer.android.com/resources/tutorials/views/hello-gallery.html" rel="nofollow">gallery widget</a>.</p>
  
  <p>Now I wanna tweak it. When the image is clicked currently it shows the index instead I wanna show the preview in the space available below the gallery. </p>
  
  <p>As per my understanding I need to change the code somewhere here:</p>
  
  <pre><code>g.setOnItemClickListener(new OnItemClickListener() {
      public void onItemClick(AdapterView parent, 
              View v, int position, long id) {
  
          Toast.makeText(HelloGallery.this, "" + position,
              Toast.LENGTH_SHORT).show();
  </code></pre>
  
  <p>Instead of a Toast I wanna use some function that would bring up the preview. Can someone help me please.</p>
  
  <p>Thanks in advance.</p>