Code Monkey home page Code Monkey logo

Comments (5)

Gryzor avatar Gryzor commented on July 26, 2024

Unless you have a very good reason to use a gallery, I suggest you use a ViewPager.

from ecogallery.

Kcorab avatar Kcorab commented on July 26, 2024

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.

Gryzor avatar Gryzor commented on July 26, 2024

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.

falnatsheh avatar falnatsheh commented on July 26, 2024

@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.

Kcorab avatar Kcorab commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.