posted 15 years ago
Yash,
If you understand the purpose of all the functions in your ImageAdapter class and the way Adapters and views work, your problem is solved.
Here's what you can do:
Override the getItem(int position) method of the ImageAdapter class to return the resource Id.
In the onItemClick(..) of your TestGridImages do a getItem on the adapter, this will return the resource Id(remember we did so earlier).Use this resource Id to create a bitmap, then write the bitmap to your ByteArrayOutputStream.