Coder Social home page Coder Social logo

Long click listener ? about tileview HOT 8 CLOSED

moagrius avatar moagrius commented on July 23, 2024
Long click listener ?

from tileview.

Comments (8)

moagrius avatar moagrius commented on July 23, 2024

Actually I never anticipated the need for it and it was not included... However @Tristus1er has implemented it in a fork (maybe this one?), which hasn't been submitted for merge request at this point (and probably wouldn't qualify since (unforturnately) it's an API breaking change)

If you don't want to hack the core, I'd suggest starting a timer in onFingerDown, a cancel in onDrag, and check the timer against a duration in onFingerUp.

from tileview.

Eteokles avatar Eteokles commented on July 23, 2024

Ok this is what I thought so, but I wanted to ensure that the function does not yet exist.
Thank you for your quick reply :)... and sorry for my bad english

from tileview.

Tristus1er avatar Tristus1er commented on July 23, 2024

You'll find what I have done there:
Tristus1er@cf801a2

I have tryed to be as clean as possible.

from tileview.

Eteokles avatar Eteokles commented on July 23, 2024

Thx.
@moagrius, after seeing @Tristus1er's modifications, i don't understand why this add is considered api breaker ( sorry if my question seems stupid :p ) ?

from tileview.

Tristus1er avatar Tristus1er commented on July 23, 2024

Cause there are some motifications to do in the interfaces = API => API broken

from tileview.

moagrius avatar moagrius commented on July 23, 2024

API breaking means a member (method or property) has been removed or a signature has changed, or an interface has been altered. You can add a method or property, or do some work behind the scenes with private stuff, but still have to be careful.

Consider that, if I implemented those changes, everyone using the lib currently would immediately have compiler errors if they grabbed the latest version and were using TileViewEventListeners, because any TileViewEventListener implementations would hot have the new methods implemented. Thus, it's API-breaking - that's not saying it's not good or not useful, just that it'd cause all existing implementations to (potentially) break.

Hope that makes sense.

from tileview.

Eteokles avatar Eteokles commented on July 23, 2024

Ok I understand.
I didn't seen this aspect ;)
Thank you for this complete answer

from tileview.

moagrius avatar moagrius commented on July 23, 2024

No problem :)

from tileview.

Related Issues (20)

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.