Code example for GestureDetectorCompat

0
	public GestureWebView(Context context, AttributeSet attrs, int defStyle, boolean privateBrowsing) {
		super(context, attrs, defStyle, privateBrowsing);
	} 
 
	public void init(GestureDetector.OnGestureListener listener) {
		mGestureDetector = new GestureDetectorCompat(getContext(), listener);
	} 
 
	@Override 
	public boolean onTouchEvent(MotionEvent event) {
		if (mGestureDetector != null) {
			mGestureDetector.onTouchEvent(event);
		} 
		return super.onTouchEvent(event);
	} 
 
} 
Experience pair programming with AI  Get Codota for Java