开发者

Is there anyway to get the scrollable width or getContentWidth?

T开发者_开发百科his is driving me a little crazy because it seems like a fairly straight forward thing. The WebView has a method called getContentHeight(), but it does not have getContentWidth().

I asked this question, which is related but I also wanted to ask this and it seemed it is slightly different so I created a separate question.

I want to figure out some way to get the total width of the scrollable content. This value is obviously known because it is used to determine the size of a horizontal scrollbar but why is there no public access to this value? Is there any way to get this value or make these calculations?


I found there are some protected methods that you can call if you subclass the view. These return some values you can use to figure this out.

computeVerticalScrollExtent()

computeVerticalScrollRange()

computeVerticalScrollOffset()


capturePicture().getWidth()

And i dont have the answer to the question WHY getContentWidth() function is not there :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜