安卓中的封面流?

发布于 2024-11-30 04:08:36 字数 283 浏览 0 评论 0原文

我使用下面的链接创建了 coverflow http://androidsnips.blogspot.com/2011 /03/images-with-coverflow-like-animation-in.html 现在我的问题是,当我单击特定图像时,它应该显示在另一个活动中吗? 这怎么可能。

提前致谢

I created coverflow using below link
http://androidsnips.blogspot.com/2011/03/images-with-coverflow-like-animation-in.html
Now my problem is when i click the particular image it shoud be displayed in another activity?
how it is possible.

Thanks In Advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

败给现实 2024-12-07 04:08:36

使用下面的代码。将其放入您的 onCreate 方法中。

        coverFlow.setOnItemClickListener(new OnItemClickListener() {

        public void onItemClick(AdapterView<?> arg0, View arg1, int position,
                long arg3) {
                           //Handle event here.                 

        }
    });

根据 coverflow 的位置创建一个意图,将值传递给具有 ImageView 的其他活动来显示所选图像。

Use the below code. Put it in your onCreate method.

        coverFlow.setOnItemClickListener(new OnItemClickListener() {

        public void onItemClick(AdapterView<?> arg0, View arg1, int position,
                long arg3) {
                           //Handle event here.                 

        }
    });

Based on the position from coverflow create a intent, pass the value to some other activity which has an ImageView to display the selected Image.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文