public class TouchTargetHelper
extends java.lang.Object
MotionEvent.
It uses the event coordinates to traverse the view hierarchy and return a suitable view.| Constructor and Description |
|---|
TouchTargetHelper() |
| Modifier and Type | Method and Description |
|---|---|
static int |
findTargetTagAndCoordinatesForTouch(float eventY,
float eventX,
android.view.ViewGroup viewGroup,
float[] viewCoords)
Find touch event target view within the provided container given the coordinates provided
via
MotionEvent. |
static int |
findTargetTagForTouch(float eventY,
float eventX,
android.view.ViewGroup viewGroup)
Find touch event target view within the provided container given the coordinates provided
via
MotionEvent. |
public static int findTargetTagForTouch(float eventY,
float eventX,
android.view.ViewGroup viewGroup)
MotionEvent.eventY - the Y screen coordinate of the touch locationeventX - the X screen coordinate of the touch locationviewGroup - the container view to traversepublic static int findTargetTagAndCoordinatesForTouch(float eventY,
float eventX,
android.view.ViewGroup viewGroup,
float[] viewCoords)
MotionEvent.eventY - the Y screen coordinate of the touch locationeventX - the X screen coordinate of the touch locationviewGroup - the container view to traverseviewCoords - an out parameter that will return the Y,X value in the target view