Android Webview Anchor Link (Jump link) not working -


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 ( & lt; a href = "# link" & gt; ...) are not working properly when the link is clicked, highlight it It does, but does not scroll to the related anchor.

This does not work even when I use the loadUrl () method of WebView to load that page which contains the anchor link. However, if I load the same URL in the browser, the anchor links work.

Do they need any special handling to work for WebWives?

I'm using API v4 (1.6).

There is not enough for the code, here are some of the relevant sections of the test code with which I am working:

  WebView detailBody = (webview) Find VVBID ( R.D.Artical_Diet_Abbs); String S = "& lt; a href = \" #link \ "& gt; LINK! & Lt; / a & gt; 















< & Lt; br / & gt; & lt; br / & gt;













; & Lt; a name = \ "link \" & gt; & lt; / a & gt; test "; DetailBody.loadDataWithBaseURL (API.HomeURL (this), s, "text / html", "utf-8", "");

The problem is that I had a WebView within a ScrollView . This way is configured when WebView is not able to scroll on an anchor link. After the restructuring of my layout to finish ScrollView, the anchor links work properly.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -