I have a web view that is loaded with an HTML that contains links. when I switch to another activity (say to another tab in a tab activity) and then switching back to it, the link is surrounded with an orange rectangle. also happens in the GoogleAdView which really makes it impossible to view.
+1
A:
It seems that the link in the WebView has the focus. Maybe you could avoid it by letting another view request the focus (anotherView.requestFocus();
) in onResume() or onStart().
Mathias Lin
2010-06-13 13:39:10
Thanks! that helped a lot. I also needed to set this anotherView to be focusableInTouchMode(true) - which got me read all about touch mode in android. great help, thanks.
oriharel
2010-06-14 10:37:56
A:
Try this to prevent webview from drawing a focus rectangle when it is first focused webView.getSettings().setNeedInitialFocus(false);
Guy
2010-07-30 23:54:51