如何获得宽度的android一个web视图和高度
问题描述:
我要确定宽度和。我一直使用已经尝试过的web视图的高度
I want to determine the width and the height of the webview .i have already tried using
webView.getWidth();
webView.getHeight();
但日志总是告诉他们0。 任何帮助将AP preciated ..
but the log always show them 0. any help will be appreciated..
感谢....
答
在 onPageFinished
回调方法不使用时正常工作 loadData code>或
loadDataWithBaseURL
。我看到 Andromedev另一种解决方案使用JavaScript,但我不相信,这是采取的最佳路径。
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.