Comments (5)
Unless you have a very good reason to use a gallery, I suggest you use a ViewPager.
from ecogallery.
I have thought about it more than one time.
If you have got a very good reason for using some "special" class then use this class and no "bad" alternative. ;-)
In my opinion ViewPager is a peculiar construct. It doesn't use View recycling and I am only able to scroll slowly.
But this is only the estimation from a newcomer.
I love (Eco)Galley so much.
from ecogallery.
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!
from ecogallery.
@Gryzor Agree, they deprecate it for a good reason.
@Kcorab Not familiar with @Gryzor version of Gallery but I recommend looking at it, hopefully it fixes your issue. If not, you could extend the EcoGallery and do the same thing that was mentioned in the SoF answer since EcoGallery extend Gallery view, feel free to send a pull request if you got it working :).
from ecogallery.
Thanks for your answers.
What I was searching for is an equivalent of Gallery. A horizontal ListView with centre locking maybe ...
A fork of ViewPager which supports multiple pages, fling and ViewRecycling I didn't find.
@falnatsheh
As I said I am a android- and java newcomer. I am not able to extend your class because of my deficient skills. :-(
I will keep searching. :-)
from ecogallery.
Related Issues (14)
- Focus is Lost when using Arrow Keys HOT 6
- Not found any tutorial for how to use it. HOT 7
- Failed to find style 'ecoGalleryStyle' in current theme HOT 8
- Can not swipe on image when add onClickListenner HOT 3
- Action on changed active image HOT 3
- getView() in BaseAdapter being called infinitely HOT 1
- Items Sometimes Snap To Center while Scrolling HOT 5
- Highlight is lost after scroll to another position. HOT 1
- Selected state is cleared for selected item
- how to add carousel effect ?
- setOnClickListener disable the "swipe"
- Custom child drawing
- java.lang.NullPointerException: when fast scroll HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecogallery.