When you click a link in the Android browser, the target link area gets highlighted with an orange box by default. A longpress then opens up the context menu for link handling (copy, paste, new window, etc). Is there a way to disable either / both of these in webview? I'm using the highlight code in scriptaculous and the default android link styling is being laid over top of the effect.
The WebView class is an extension of Android's View class that allows you to display web pages as a part of your activity layout. It does not include any features of a fully developed web browser, such as navigation controls or an address bar. All that WebView does, by default, is show a web page.
If you want to override certain methods, you have to create a custom WebView class which extends WebView . Also, when you are inflating the WebView , make sure you are casting it to the correct type which is CustomWebView . CustomWebView webView = (CustomWebView) findViewById(R. id.
Within the shouldOverrideUrlLoading() method simply get the URL from the request and pass into the Intent. See the full example.
This might be useful: How to Hide Android WebView Highlight Border
The answer being: add this CSS * { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
.
Hopefully it is.
The suggested solution sets the color as transparent black:
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
Simply specifying the color as transparent
should work:
* {
-webkit-tap-highlight-color: transparent;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With