public static boolean (View view, MotionEvent ev) { int[] location = new int[2]; view.getLocationInWindow(location); int x = location[0]; int y = location[1]; if (ev.getX() > x && ev.getX() < (x + view.getWidth()) && ev.getY() > y && ev.getY() < (y + view.getHeight())){ return true; } return false; }
|
近期评论