Android Gallery View Scrolling problem when onClickListener for items given

Ganapathy C picture Ganapathy C · Mar 3, 2011 · Viewed 9.7k times · Source

I have used gallery in my app.

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

enter image description here

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

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.

How to archive both scroll and onClick for each images.

Answer

Reno picture Reno · Mar 3, 2011

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