Android Webview Anchor Link (Jump link) not working

Posted by Joel on Stack Overflow See other posts from Stack Overflow or by Joel
Published on 2010-06-14T17:50:56Z Indexed on 2010/06/14 17:52 UTC
Read the original article Hit count: 2122

Filed under:
|
|

Hi,

I have a WebView in my Android App that is loading an HTML string using the loadDataWithBaseURL() method. The problem is that local anchor links (<a href="#link">...) are not working correctly. When the link is clicked, it becomes highlighted, but does not scroll to the corresponding anchor.

This also does not work if I use the WebView's loadUrl() method to load a page that contains anchor links. However, if I load the same URL in the browser, the anchor links do work.

Is there any special handling required to get these to work for a WebView?

I am using API v4 (1.6).

© Stack Overflow or respective owner

Related posts about android

Related posts about webview