tags:

views:

113

answers:

2

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
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
A: 

Try this to prevent webview from drawing a focus rectangle when it is first focused webView.getSettings().setNeedInitialFocus(false);

Guy