开发者

Opening the Clicked Image from a GridView

开发者 https://www.devze.com 2023-02-20 17:26 出处:网络
Might be a stupid question... But I need to know how to open/display an image when clicked on its thumbnail which is already on the screen in a gridview. My main interest here is to know how android r

Might be a stupid question... But I need to know how to open/display an image when clicked on its thumbnail which is already on the screen in a gridview. My main interest here is to know how android recognizes the original image f开发者_开发技巧rom its thumbnail. I read that the IMAGE_ID from the MediaStore.Images.Thumbnails is the original image for the thumbnail. But I don't know how to work on this. The IMAGE_ID, which is a string is always returning the value "image_id" and hence I'm stuck here. I am using

gridview.setOnItemClickListener(new OnItemClickListener()

and then overriding

public void onItemClick(AdapterView<?> parent, View view, int position, long id) method which calls the Activity to display the image in full screen.

Any snippet help is appreciated.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号