开发者

Calculate height of a webview in advance?

I have several w开发者_StackOverflow社区ebviews that will be displaying text with html tags. I want to be able to calculate what the height of the webview would be if it wrapped the contents so that I can animate the height to that point myself. Given an html string, how can I calculate the height it will take up in a webview of a given width?


You can use the PictureListener hook to get the size and run your animation the instant the page is finished loading. It will happen fast enough that it is like knowing in advance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜