Created
March 1, 2018 16:03
-
-
Save sharifulislam52/7cc64a14887932522b655f401d0738bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private GestureDetectorCompat gd; | |
// into onCreate method -----> | |
gd = new GestureDetectorCompat(this,this); | |
gd.setOnDoubleTapListener(this); | |
// <----- into onCreate method | |
@Override | |
public boolean onTouchEvent(MotionEvent event){ | |
gd.onTouchEvent(event); | |
return super.onTouchEvent(event); | |
} | |
// start Gesture methods | |
@Override | |
public boolean onSingleTapConfirmed(MotionEvent motionEvent) { | |
// what want to do | |
return false; | |
} | |
@Override | |
public boolean onDoubleTap(MotionEvent motionEvent) { | |
// what want to do | |
return false; | |
} | |
@Override | |
public boolean onDoubleTapEvent(MotionEvent motionEvent) { | |
// what want to do | |
return false; | |
} | |
@Override | |
public boolean onDown(MotionEvent motionEvent) { | |
// what want to do | |
return false; | |
} | |
@Override | |
public void onShowPress(MotionEvent motionEvent) { | |
// what want to do | |
} | |
@Override | |
public boolean onSingleTapUp(MotionEvent motionEvent) { | |
// what want to do | |
return false; | |
} | |
@Override | |
public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent1, float v, float v1) { | |
// what want to do | |
return false; | |
} | |
@Override | |
public void onLongPress(MotionEvent motionEvent) { | |
// what want to do | |
} | |
@Override | |
public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent1, float v, float v1) { | |
// what want to do | |
return false; | |
} | |
// end Gesture methods | |
// gd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment