I am using WebView to display some (locally stored) HTML. WebView automatically converts various parts of the text into interactive links; this is somewhat useful for web addresses, etc., but often, unfortunately, error numbers (especially years) on the page like phone numbers and turns them into links as well.
Suppose I'm happy to disable all links on the page. Visually, I can get in part there by applying various CSS styles, in particular, setting the appropriate values for -webkit-touch-callout and -webkit-tap-highlight-color will make the links appear like plain text. Then I can set a custom WebViewClient that overrides shouldOverrideUrlLoading(WebView view, String url) (returns true) so that WebView does not load the URL.
For touch access, this works great and, of course, gives the impression that there are no links on the page. However, if they are used on a device with a trackball / guide bar, we can focus on each of the links and an orange frame appears around them.
Is there a way (ideally) to have more control over the WebView auto-linking function or otherwise stop visual focus links when using a directional panel?
source share