美文网首页
view location

view location

作者: zhi5ai | 来源:发表于2017-10-18 16:36 被阅读7次

popupContent.getLocationOnScreen(cloc);

selectableText.getLocationInWindow(bloc);

//always be x-357  y-84

Log.i("popcontent-cloc-screen",cloc[0]+"vv"+cloc[1]);

//tloc always be x-18  y-102

Log.i("TextView-tloc-window",tloc[0]+"vv"+tloc[1]);


View.getLocationInWindow(int[] location)

一个控件在其父窗口中的坐标位置

View.getLocationOnScreen(int[] location)

一个控件在其整个屏幕上的坐标位置

相关文章

网友评论

      本文标题:view location

      本文链接:https://www.haomeiwen.com/subject/gzdeuxtx.html