getLocationOnScreen 、getLocationInWindow、 getGlobalVisibleRect

v.getLocationOnScreen(location) // 获得view相对于整个屏幕的左上角坐标get

v.getLocationInWindow(location) // 获得view相对于当前Activity的左上角坐标it

平板项目为横屏模式,弹出的popupwindow 位置在刘海平手机上错位,后来发现getLocationOnScreen 包含了刘海平中状态栏的高度io

相关文章
相关标签/搜索