How to set a tag for a Array of Images?
<p>I am retreiving images from a url using this.</p>

<pre><code>    public ImageAdapter(Context c) { this.myContext = c; }





                /** Returns the amount of images we have defined. */
          public int getCount() { 
                return this.myRemoteImages.length;
                }




                /* Use the array-Positions as unique IDs */
           public Object getItem(int position) { 
                return position; 
                }


           public long getItemId(int position) { 
                    return position; 
                    }


                /** Returns a new ImageView to
                * be displayed, depending on
                * the position passed. */
            public View getView(int position, View convertView, ViewGroup parent) {
                ImageView i = new ImageView(this.myContext);

            //  i.setTag(mImageURLs[position]);


                try {


            URL aURL = new URL(myRemoteImages[position]);
            Log.v("ImageLoader", "Remote images set");


            URI imageUri = null;

            //Setting the Uri of aURL to imageUri.
            try {
            imageUri = aURL.toURI();

            } catch (URISyntaxException e1) {
            // TODO Auto-generated catch block
                e1.printStackTrace();
                        }



                //Testing to see if images are already in cache, if not then we load the images from the web and save them to the cache.
           if (new File(new File(myContext.getCacheDir(), "thumbnails"), "" + imageUri.hashCode()).exists())
                           {

        Log.v("Loader", "File exists in cache. Now pulling from the cache");

        String cachFile = myContext.getCacheDir() +"/thumbnails/"+imageUri.hashCode();
        FileInputStream fis;

        try {
        fis = new FileInputStream(cachFile);
        Bitmap bm = BitmapFactory.decodeStream(fis); 
        i.setImageBitmap(bm);
</code></pre>

<p>How could i set the tag for the 4 images being retreived. And then retrieve the tags for each one her..</p>

<pre><code>  gallery.setOnItemClickListener(new OnItemClickListener() {

        public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position,
                long id) {


                Log.i("Click event","In gallery");
                Object item = gallery.getItemAtPosition(position);
                Toast.makeText(MainMenu.this, "You clicked " + item, Toast.LENGTH_SHORT).show();
                //Get the tag here

        }    
   });
</code></pre>
