Android:Webview with link highlight
I am working with WebView on android and can't seem to figure out how to make that orange highlight that appears in the stock browser to appear on my webview.
To make it clearer let me give you an example.
When in android brows开发者_StackOverflow社区er if you click on a link/image/video it'll show you a orange colored rectangle overlayed over that object. But when i try the same with my webview it does not show anything and goes onto loading that link
Oh !! i feel such an idiot... the webview does the default highlighting , the only thing was i was not giving it focus.
adding this line solved my problem
myWebView.requestFocus(View.FOCUS_DOWN);
I wanted to add that sometimes the first link of a webview would be highlighted by default when the webview became visible-- you can get rid of that by calling "mWebView.clearFocus()"
精彩评论