Android Webview Anchor Link (Jump link) not working

前端 未结 7 1229
后悔当初
后悔当初 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:16

    It looks like the problem is that I had a WebView within a ScrollView. The WebView isn't able to scroll to an anchor link when configured like this. After refactoring my layout to eliminate the ScrollView, the anchor links work correctly.

提交回复
热议问题