Add an event to GestureDetector

Actually i have GestureDetector for a WebView, it's works, i can change the page to load by left and right swipe but zoom, pan and active links has stopped to work. This is the listener:

private GestureDetector.SimpleOnGestureListener sogl = new GestureDetector.SimpleOnGestureListener() {

        public boolean onDown(MotionEvent event) {
            Log.d("Gesture","onDown");
            return true;
        }

        public boolean onFling(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY) {
            if (event1.getRawX() > event2.getRawX()) {
                if(currentPage<maxPage)
                    currentPage++;
                webV.loadUrl("file:///sdcard" + Values.APP_FOLDER + "/" + catalogo +"/versione-html/" + currentPage + estensione);
            } else {
                if(currentPage>1)
                    currentPage--;
                webV.loadUrl("file:///sdcard" + Values.APP_FOLDER + "/" + catalogo +"/versione-html/" + currentPage + estensione);
            }
            return true;
        }
    };

The question is: can i add this single event (left and right swipe) to the webview default GestureDetector? I need to zoom and keep active links on the webview and also change page with swipe.

Thank you for your help.

Answers


Wild guess, but I would consider sending all the touches you receive inside the GestureDetector down to the WebView via webV.onTouchEvent(event)


Need Your Help

ISO15693 (NfcV) / Tag-it HF-I commands throw tag lost exception

android tags nfc rfid iso-15693

When I try to transceive commands for NFC-V Tag-it HF-I Plus Inlay tag I get a TagLostException for most of the commands.

4-bit ECC algorithm

algorithm embedded

Can anyone give a reference for a 4-bit ECC algorithm?