Preventing The Android "long Press" To Save Images
I've written a web-app in HTML and Javascript for iPhone and Android which involves the dragging and dropping images. You initiate the drag by holding your finger over the image fo
Solution 1:
Javascript has a function to prevent the default action of a browser for the event in question.
In your javascript try:
event.preventDefault();
See: https://developer.mozilla.org/en/DOM/event.preventDefault
Solution 2:
Use this event:
$(document).on('contextmenu', function (e) {
// stop long touch hold from poping up context menusreturnfalse;
});
Solution 3:
In your activity that shows the webview, try extending GestureDetector.SimpleOnGestureListener
. Then override the onLongPress(MotionEvent e)
method and doing nothing.
If that doesn't work, you might have to create a custom webview that inherets from webview and overrides onLongPress there.
Or maybe you could try
WebViewwv=(WebView) findViewById()
wv.setClickable(false)
Post a Comment for "Preventing The Android "long Press" To Save Images"