I want to determine the width and the height of the WebView
. I have already tried it using:
webView.getWidth();
webView.getHeight();
If you want to get the original height after loading content, you can use the below code. Though the code is deprecated, yet it works perfectly.
webview.setPictureListener(new WebView.PictureListener() {
@Override
public void onNewPicture(WebView webView, @Nullable Picture picture) {
int height = webview.getContentHeight();
int height1 = webview.getMeasuredHeight();
int height2 = webview.getHeight();
}
});