Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to listen to events on ListView #5

Open
droididan opened this issue Sep 24, 2015 · 0 comments
Open

Try to listen to events on ListView #5

droididan opened this issue Sep 24, 2015 · 0 comments

Comments

@droididan
Copy link

Hi,

I am trying to show a custom view when the user is at the last item in my list (last message in chat app) and swiping up. I think i can do that with your lib but it doesn't work.

SimpleFingerGestures sfg = new SimpleFingerGestures();
    sfg.setDebug(true);
    sfg.setConsumeTouchEvents(true);

    sfg.setOnFingerGestureListener(new SimpleFingerGestures.OnFingerGestureListener() {
        @Override
        public boolean onSwipeUp(int fingers, long gestureDuration, double gestureDistance) {
            Log.d(TAG, "Swipe Up ----- Fingers: " + fingers + "\ngestureDuration: " + gestureDuration + "\ngestureDistance: " + gestureDistance);


            return false;
        }

        @Override
        public boolean onSwipeDown(int fingers, long gestureDuration, double gestureDistance) {

            Log.d("Swipe", "Swipe Up Down ------ Fingers: " + fingers + "\ngestureDuration: " + gestureDuration + "\ngestureDistance: " + gestureDistance);
            return false;
        }

        @Override
        public boolean onSwipeLeft(int fingers, long gestureDuration, double gestureDistance) {
            Log.d("Swipe", "Fingers: " + fingers + "\ngestureDuration: " + gestureDuration + "\ngestureDistance: " + gestureDistance);
            return false;
        }

        @Override
        public boolean onSwipeRight(int fingers, long gestureDuration, double gestureDistance) {

            Log.d("Swipe", "Fingers: " + fingers + "\ngestureDuration: " + gestureDuration + "\ngestureDistance: " + gestureDistance);
            return false;
        }

        @Override
        public boolean onPinch(int fingers, long gestureDuration, double gestureDistance) {
            return false;
        }

        @Override
        public boolean onUnpinch(int fingers, long gestureDuration, double gestureDistance) {
            return false;
        }

        @Override
        public boolean onDoubleTap(int fingers) {
            return false;
        }
    });

    listMessages.setOnTouchListener(sfg);

view_chat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant