Android gallery onItemClick show larger image
<p>I've just finished copying the android walkthrough for the gallery (http://developer.android.com/resources/tutorials/views/hello-gallery.html) and was wondering how I would go about having the thumbnail photo scale into a larger one within the onClickItem method.</p>

<pre><code>        public void onItemClick(AdapterView parent, View v, int position, long id) {
            Toast.makeText(ProjectPreview.this, "" + position, Toast.LENGTH_SHORT).show();
        }
</code></pre>

<p>Currently it just shows the position as depicted in the Toast. Could someone point me in the right direction or show me a simple way?</p>

<p>Thanks in advance.</p>

<p>EDIT: Added this method and called it in the onItemClick sending it the position. And it works. </p>

<pre><code>    public void showLarger(int position){
        ImageView image = (ImageView) findViewById(R.id.iv1);
        image.setLayoutParams(new Gallery.LayoutParams(200, 100));
        image.setScaleType(ImageView.ScaleType.FIT_XY);
        image.setImageResource(mImageIds[position]);
    }
</code></pre>
