I am trying to reach bottom of a Webview. I am getting the height of Webview inside onPageFinished() method by,
override fun onPageFinished(view: WebView?, url: String?) {
Log.d("webview_total_height", "height " + view!!.contentHeight)
height = view!!.contentHeight
}
And on button click I am trying to reach to bottom by,
wvMain.scrollTo(0, height)
But it's scrolling to somewhere middle of webview, not reaching bottom
How will I reach to the bottom of webview?
view.scrollTo(0, view.getContentHeight());WebViewtry overriding and exposing protected method computeVerticalScrollRange().