Android: Disable text selection in a webview
I figured it out!! This is how you can implement your own longtouchlistener. In the function longTouch you can make a call to your javascript interface.
var touching = null;
$('selector').each(function() {
this.addEventListener("touchstart", function(e) {
e.preventDefault();
touching = window.setTimeout(longTouch, 500, true);
}, false);
this.addEventListener("touchend", function(e) {
e.preventDefault();
window.clearTimeout(touching);
}, false);
});
function longTouch(e) {
// do something!
}
This works.
Disable text selection in WebView on WP8.1
This can be achieved by using JavaScript or CSS. Here's the answer from MSDN forums which addresses this issue. Hope this helps.
<html onselectstart="return false;" style="-ms-user-select: none;">
...
</html>
Related Topics
Tabhost with Fragments and Fragmentactivity
How to Limit the Height of Spinner Drop Down View in Android
Getting the Battery Current Values for the Android Phone
Why Do I Get Com.Google.Android.Gms.Common.Api.Apiexception: 10:
Android - R Cannot Be Resolved to a Variable
Is There a Simple Example of the Popupwindow Class Using Android V2.0
"Canvas: Trying to Draw Too Large Bitmap" When Android N Display Size Set Larger Than Small
Android Intent for Playing Video
How to Use Radiogroup in Listview Custom Adapter
How to Get Android Device Screen Size
When and Why Should I Use Fragments in Android Applications
Android: Under What Circumstances Would a Dialog Appearing Cause Onpause() to Be Called
Custom Ssl Handling Stopped Working on Android 2.2 Froyo
How to Show Android Checkbox at Right Side
Android:Actionbarstyle Requires API Level 11
How to Force an Entire Layout View Refresh
Android Actionbar How to Add Supporting Library V7 Appcompat for Eclipse