I can't scroll EcoGallery with Views which are clickable like Buttons ... #10
Comments
Unless you have a very good reason to use a gallery, I suggest you use a ViewPager. |
I have thought about it more than one time. In my opinion ViewPager is a peculiar construct. It doesn't use View recycling and I am only able to scroll slowly. I love (Eco)Galley so much. |
I have hacked around the Gallery long enough to know how bad the code is (and I can imagine why Google engineers saw the code and said, well we gotta deprecate this hack). ;) In any case, if you still want to use it, I suggest you use my (little bit enhanced) version: https://github.com/Gryzor/TimelineGallerySample Please note that I do not use it anymore. There are multiple ViewPager forks (the source is open) that scroll faster and provide other sorts of niceties. In my experience, it doesn't feel like the old gallery, ever, but it's generally more stable, faster and less problematic in the long run. (In the short term it's more annoying because you have to deal with the ViewPager "Peculiarities". ;) You can achieve most (if not all) of the old gallery features (center, scroll, fling, etc.) with a ViewPager. Unless you really really need the Gallery, I recommend you learn and try ViewPagers. They seem to be here to stay anyway. Good luck! |
@Gryzor Agree, they deprecate it for a good reason. |
Thanks for your answers. @falnatsheh I will keep searching. :-) |
Hello,
I want to use the EcoGallery like a horizontal ListView with locking centre. My BaseAdapter holds a lot of Buttons which are match_parent in height and width. An OnClickListener is set for any Button.
Now the problem is that the EcoGallery is not scrollable.
For the old Gallery a similar problem existed but was solved very well. Please see:
http://stackoverflow.com/questions/8127828/scrolling-a-gallery-with-buttons
Can you extend the EcoGallery for one setter-methode which makes the EcoGallery scrollable in this case?
The text was updated successfully, but these errors were encountered: