How to get width and height of a Webview in android

后端 未结 12 1059
长发绾君心
长发绾君心 2021-01-04 17:13

I want to determine the width and the height of the WebView. I have already tried it using:

webView.getWidth();
webView.getHeight();
         


        
12条回答
  •  攒了一身酷
    2021-01-04 17:42

    The onPageFinished call back approach does not work when using loadData or loadDataWithBaseURL. I saw another solution on Andromedev using JavaScript, but I'm not convinced that this is the best path to take.

提交回复
热议问题