public class TouchDelegate extends Object
The ancestor should then forward all of its touch events received in its
View.onTouchEvent(MotionEvent)
to onTouchEvent(MotionEvent)
.
Modifier and Type | Field and Description |
---|---|
static int |
ABOVE
The touchable region of the View extends above its actual extent.
|
static int |
BELOW
The touchable region of the View extends below its actual extent.
|
static int |
TO_LEFT
The touchable region of the View extends to the left of its
actual extent.
|
static int |
TO_RIGHT
The touchable region of the View extends to the right of its
actual extent.
|
Constructor and Description |
---|
TouchDelegate(Rect bounds,
View delegateView)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
onTouchEvent(MotionEvent event)
Will forward touch events to the delegate view if the event is within the bounds
specified in the constructor.
|
public static final int ABOVE
public static final int BELOW
public static final int TO_LEFT
public static final int TO_RIGHT
public boolean onTouchEvent(MotionEvent event)
event
- The touch event to forward