Prevent unwanted flicker due to innate WebView behavior

后端 未结 2 1960
北海茫月
北海茫月 2021-01-06 18:50

I am using an Android WebView to show some HTML content (a String with HTML tags to be precise) generated at runtime. The content has basically an HTML &l

2条回答
  •  花落未央
    2021-01-06 19:12

    Can you try something like this:

    if (_webView.getScrollY() + _webView.getHeight() > _webView.getContentHeight())
        _webView.scrollTo(0, _webView.getContentHeight() - _webView.getHeight());
    

提交回复
热议问题