开发者

Real size of Android dialog

How can I know the real size of some custom dialog box with specified "fill_parent" measures?

Explanation:

I have an XML wi开发者_Python百科th a custom dialog box. The W/H sizes are "fill_parent". Android shows some cute dialog box much lesser than X/Y of screen. I'd like to know the exact size of this dialog after it was shown.

Thanks.


Each view has two pairs of Size values.

One pair is getMeasuredWidth() and getMeasuredHeight(), this value describes how big specific widget wants to be.

Second pair is getWidth() and getHeight(), called drawable Width and drawable Height, this values describe Size of the widget after drawing.

Keep in mind padding as well.

Hope this helps, let me know if you need more assistance.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜