int [] position=new int[2];
parent.getLocationInWindow(position);
其中position[0]表示空间相对于窗口左边的距离
其中position[1]表示空间相对于窗口上端的距离度
parent.getLocationInWindow(position);
其中position[0]表示空间相对于窗口左边的距离
其中position[1]表示空间相对于窗口上端的距离度