view location

2017-10-18  本文已影响7人  zhi5ai

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)

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

上一篇 下一篇

猜你喜欢

热点阅读