//获取的是距离屏幕左侧的x和y
if (isPointInView(popupView, (int) motionEvent.getRawX(), (int) motionEvent.getRawY())) {
private boolean isPointInView(View view, int x, int y) {
int[] location = new int[2];
//获取view的坐标并赋值给location数组
view.getLocationOnScreen(location);
int left = location[0];
int top = location[1];
int right = left + view.getWidth();
int bottom = top + view.getHeight();
return x >= left && x <= right && y >= top && y <= bottom;
}