Joy
Joy

Reputation: 102

How to implement double tap for gridview item

I want to implement gesture inside the Gridview item.

When i am doing double tap. have to show some animation Is that possible is Grid view, if possible Please guide me to do this

Please share some snippets Thanks

Upvotes: 4

Views: 1650

Answers (2)

Ben Groot
Ben Groot

Reputation: 5050

Detecting a double tap gesture inside of a GridView item is described in this awesome post: Android: How to detect double-tap?

Upvotes: 2

vinay Maneti
vinay Maneti

Reputation: 1451

Extend GestureDetector.SimpleOnGestureListener and override it's onDoubleTap() method

class DoubleTapGestureDetector extends GestureDetector.SimpleOnGestureListener {

        @Override
        public boolean onDoubleTap(MotionEvent e) {
            Log.d("TAG", "Double Tap Detected ...");
            return true;
        }

    }

Upvotes: -1

Related Questions