Android Webview Anchor Link (Jump link) not working

前端 未结 7 1233
后悔当初
后悔当初 2020-12-01 06:53

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 (

7条回答
  •  一个人的身影
    2020-12-01 07:04

    try this
    
    String myTemplate = "LINK!










    Testing!"; myWebView.loadDataWithBaseURL(null, myTemplate, "text/html", "utf-8", null);

    the word "Testing!" must be outside of the screen to see it works.

提交回复
热议问题