开发者

open the image from a gallery

开发者 https://www.devze.com 2023-02-15 03:03 出处:网络
i m following the helloGallery tu开发者_运维问答torial but i would like to open the image when i click it instead of present a toast with the position of the image...any help?this is my code,that pres

i m following the helloGallery tu开发者_运维问答torial but i would like to open the image when i click it instead of present a toast with the position of the image...any help?this is my code,that presents the position:

  g.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView parent, View v, int position, long id) {
                Toast.makeText(HelloGallery.this, "" + position, Toast.LENGTH_SHORT).show();
            }
        });


This tutorial shows how to do what you're looking for: http://www.androidpeople.com/android-gallery-imageview-example/

0

精彩评论

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

关注公众号