如果popupWindow 的高度设置为 wrap_content 时,popupWindow.getHeight()的值为0或负值,此时若要获取popupWindow的高度,需要用popupWindow.getContentView().getMeasuredHeight()方法,当设置为确定值时,getHeight()可以得到设置的具体值。
PopupWindow高度问题记录
最新推荐文章于 2020-12-22 07:40:55 发布