开发者

Preview Image when clicked- Android

开发者 https://www.devze.com 2023-02-05 11:20 出处:网络
I\'m a novice Android developer. I used the code given at Google\'s Android developer site and developed the gallery widget.

I'm a novice Android developer. I used the code given at Google's Android developer site and developed the gallery widget.

Now I wanna tweak it. When the image is clicked currently it shows the index instead I wanna show the preview in the space available below the gallery.

As per my understanding I need to change the code somewhere here:

g.setOnItemClickListener(new OnItemClickListener() {
    public void onItemClick(AdapterView parent, 
            View v, int position, long id) {

   开发者_运维知识库     Toast.makeText(HelloGallery.this, "" + position,
            Toast.LENGTH_SHORT).show();

Instead of a Toast I wanna use some function that would bring up the preview. Can someone help me please.

Thanks in advance.


checkout this and look into Gallery and ImageView Views example

0

精彩评论

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