Reputation: 216
How can I catch a double click in WebBrowser? I tried to find an anwer in other sites, but I found nothing.
I want to set zoom by double click.
How can I do it?
Thank you!
Upvotes: 1
Views: 673
Reputation: 10959
try this
final GestureDetector gestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onDoubleTap(MotionEvent e) {
// your custom way to zoom
return true;
}
});
yourWebView.setOnTouchListener(new OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
return gestureDetector.onTouchEvent(event);
}
});
Upvotes: 1