I have a gallery of fairly complicated items. Each item is composed of an image and 2 buttons. When the gallery loads everything works, the buttons do what they are supposed to, and the pressed state for the buttons happens only on actual press of the buttons.
However as soon as I scroll the gallery, the buttons stop working and clicking anywhere enables the pressed state for the buttons.
I have tried embedding everything in a LinearLayout that doesn't pass on OnDown events as per this answer however, this just blocks click events.
I am aware that Gallery is not the ideal widget for complicated layouts like this, but I am wondering if there is a better workaround for this issue.
UPDATE:
I will try to explain the architecture a bit. I have a FragmentActivity which contains a ListFragment, which is made up of just a ListView.
The ListView is made up of groups of smaller elements(Bettable) along with some meta information. These groups are implemented as Gallerys. Specifically I have extended Gallery (called OneGallery), that does several things, it makes sure that only one item is scrolled at a time, and also transforms the gallery items as the scrolling is happening. Here is the code for that
Here is the adapter for the Gallery
And here is the code for the Bettable layout