Android get specific value on array on other class
<p>I have an array on my Activity which consist R.drawables images declared inside a 
public class ImageAdapter extends BaseAdapter.
So it consists of</p>

<pre><code>private   Integer[] imageIDs = {
            R.drawable.medal_my_first_perxtamp_gray,
            R.drawable.medal_you_complete_me_gray,
            R.drawable.medal_the_gift_of_sharing_gray,
            R.drawable.medal_gimme_5_gray,
            R.drawable.medal_a_cup_of_coffee_gray,
            R.drawable.medal_seven_up_gray,
            R.drawable.medal__gray,
            R.drawable.medal_midnight_madness_gray,
            R.drawable.medal_loyalista_gray,
            R.drawable.medal_15_30_gray,
            R.drawable.medal_kmh_gray,
            R.drawable.medal_champion_gray
            };
</code></pre>

<p>Now on my class that extends my activity how can I call that array and get a specific value? Sorry for a simple question but I am new to this Android Development</p>

<p><strong>EDIT:</strong></p>

<p>I forgot to add this one, a declaration to get the length of that array which is also stored inside ImageAdapter class</p>

<pre><code>  public int getCount() {
        return imageIDs.length;
    }
</code></pre>

<p>And added this code for getter</p>

<pre><code>public  Integer[] getImageIDs()
    {
        return this.imageIDs;
    } 
</code></pre>

<p><em>Sir</em>
This is the code i am trying to create on my other class that Extends a activity</p>

<pre><code> GridView gridView = (GridView) findViewById(R.id.gridview);
    gridView.setAdapter(new ImageAdapter(this));

    gridView.setOnItemClickListener(new OnItemClickListener() 
    {
        public void onItemClick(AdapterView&lt;?&gt; parent, 
        View v, int position, long id) 
        {   
             //Integer[] imageIDs = this.getImageIDs();
            // clicked picture here
            Integer[] imageIDs = this.getImageIDs();
            //Toast.makeText(getBaseContext(),"pic" + (position + 1) + " selected",Toast.LENGTH_SHORT).show();
            //Integer[] imageIDs = ImageAdapter.this.getImageIDs();
            //for (Integer imageId : ImageAdapter.getImageIDs()){
                //  System.out.println(imageId );
                //}
        }
    });  
</code></pre>

<p>See that I can get the position but I dont want to use those tutorial using if else 
<a href="http://stackoverflow.com/questions/10769989/how-do-i-get-the-selected-item-from-a-gridview-with-imageadapter-android">Tutorial Here</a> because I think it will be a long if else. What I am thinking is that since I have a array why cant I use that to get what I am looking for</p>
