java.lang.Object | |
↳ | android.view.TouchDelegate |
Helper class to handle situations where you want a view to have a larger touch area than its actual view bounds. The view whose touch area is changed is called the delegate view. This class should be used by an ancestor of the delegate. To use a TouchDelegate, first create an instance that specifies the bounds that should be mapped to the delegate and the delegate view itself.
The ancestor should then forward all of its touch events received in its
onTouchEvent(MotionEvent)
to
onTouchEvent(MotionEvent)
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ABOVE | The touchable region of the View extends above its actual extent. | |||||||||
int | BELOW | The touchable region of the View extends below its actual extent. | |||||||||
int | TO_LEFT | The touchable region of the View extends to the left of its actual extent. | |||||||||
int | TO_RIGHT | The touchable region of the View extends to the right of its actual extent. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Will forward touch events to the delegate view if the event is within the bounds
specified in the constructor.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The touchable region of the View extends above its actual extent.
The touchable region of the View extends below its actual extent.
The touchable region of the View extends to the left of its actual extent.
The touchable region of the View extends to the right of its actual extent.
Constructor
bounds | Bounds in local coordinates of the containing view that should be mapped to the delegate view |
---|---|
delegateView | The view that should receive motion events |
Will forward touch events to the delegate view if the event is within the bounds specified in the constructor.
event | The touch event to forward |
---|