private boolean inRangeOfView(View view
, MotionEvent ev
) {
int[] location
= new int[2];
view
.getLocationOnScreen(location
);
int x
= location
[0];
int y
= location
[1];
return !(ev
.getX() < x
) && !(ev
.getX() > (x
+ view
.getWidth())) && !(ev
.getY() < y
) && !(ev
.getY() > (y
+ view
.getHeight()));
}
转载请注明原文地址: https://win8.8miu.com/read-148.html