Problem on onItemClick on GalleryView
<p>I am displaying multiple images using the Gallery class</p>

<p>I am using the following code to </p>

<pre><code>private SampleGallery mGalleryView1 = null;


mGalleryView1 = (SampleGallery) findViewById(R.id.galleryView1);
mGalleryView1.setOnItemClickListener(this); 
</code></pre>

<p><strong>SampleGallery class extends the Gallery</strong></p>

<p>The problem I am facing is that , when I am clicking on the images, </p>

<p>from the following method</p>

<pre><code>public void onItemClick(AdapterView&lt;?&gt; l, View v, int position, long id) {}
</code></pre>

<p>I am getting the position of the image as a no like "13878342720" &amp; not any value like "0" , "1" .</p>

<p>Actually based on the position value , I am doing some logical calculations , so am ending getting the "ArrayIndexOutOfBoundsException" , since the position value is returning nothing.</p>

<p>Kindly provide your inputs , why the position is being returned so.</p>

<p>Thanks in advance.</p>

<p>Warm Regards,</p>

<p>CB</p>
