Android的相册查看滚动的问题onClickListener的项目时给予 [英] Android Gallery View Scrolling problem when onClickListener for items given

查看:167
本文介绍了Android的相册查看滚动的问题onClickListener的项目时给予的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用的画廊。

I have used gallery in my app.

在我有两个图像,这样每家画廊的项目

In that i have two images in each gallery item like this

每个兔和小鼠图像被合并为一个单一的库项目

Each rabbit and mouse image is combined as a single gallery item.

所以,我给onclickListener为图像,但如果我给像我不能触摸这些图像......如果我删除onClickListener因为我能够滚动个别图像滚动。

So I give onclickListener for both images but if I give like that I can't scroll by touching those images... If I remove onClickListener for that individual images I am able to scroll.

如何归档两个涡旋和的onClick为每个图像。

How to archive both scroll and onClick for each images.

推荐答案

这<一href="http://stackoverflow.com/questions/937313/android-basic-gesture-detection/938657#938657">answers你的问题。你必须让你的活动同时处理的onClick和手势。

This answers your question. You have to let your activity handle both onClick and Gestures.

这篇关于Android的相册查看滚动的问题onClickListener的项目时给予的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆