GestureType
- The type of the drag gestures, which are created by the builderBuilderType
- The type of the builderprotected abstract static class DragGesture.Builder<GestureType,BuilderType>
extends java.lang.Object
DragGesture
.Modifier and Type | Field and Description |
---|---|
protected int |
threshold
The threshold of the gestures, which are created by the builder.
|
protected android.graphics.RectF |
touchableArea
The bounds of the onscreen area, which is taken into consideration for recognizing the
drag gestures, which are created by the builder.
|
Constructor and Description |
---|
Builder()
Creates a new builder, which allows to configure and create instances of the class
DragGesture . |
Modifier and Type | Method and Description |
---|---|
abstract GestureType |
create()
Creates and returns the drag gesture.
|
protected BuilderType |
self()
Returns a reference to the builder.
|
BuilderType |
setThreshold(int threshold)
Sets the threshold of the drag gestures, which are created by the builder.
|
BuilderType |
setTouchableArea(float left,
float top,
float right,
float bottom)
Sets the bounds of the onscreen area, which should be taken into consideration for
recognizing the drag gestures, which are create by the builder.
|
BuilderType |
setTouchableArea(android.graphics.RectF bounds)
Sets the bounds of the onscreen area, which should be taken into consideration for
recognizing the drag gestures, which are create by the builder.
|
protected int threshold
protected android.graphics.RectF touchableArea
public Builder()
DragGesture
.@NonNull protected final BuilderType self()
public abstract GestureType create()
@NonNull public final BuilderType setThreshold(int threshold)
threshold
- The threshold, which should be set, in pixels as a Integer
value. The
threshold must be at least 0 or -1, if the default threshold should be used@NonNull public final BuilderType setTouchableArea(float left, float top, float right, float bottom)
left
- The coordinate of the left edge in pixels as a Float
value. The
coordinate must be at least 0top
- The coordinate of the top edge in pixels as a Float
value. The coordinate
must be at least 0right
- The coordinate of the right edge in pixels as a Float
value. The
coordinate must be greater than the coordinate of the left edgebottom
- The coordinate of the bottom edge in pixels as a Float
value. The
coordinate must be greater than the coordinate of the top edge@NonNull public final BuilderType setTouchableArea(@Nullable android.graphics.RectF bounds)
bounds
- The bounds, which should be set, as an instance of the class RectF
or
null, if the area should not be restricted