public static final class Events.MotionInputEvent extends Object implements Events.InputEvent
Constructor and Description |
---|
MotionInputEvent(MotionEvent event,
RecyclerView view) |
Modifier and Type | Method and Description |
---|---|
int |
getItemPosition()
Returns the adapter position of the item under the finger/cursor.
|
Point |
getOrigin() |
boolean |
isActionDown()
Returns true if the action is the initial press of a mouse or touch.
|
boolean |
isActionUp()
Returns true if the action is the final release of a mouse or touch.
|
boolean |
isMouseEvent() |
boolean |
isOverItem()
Returns true if the there is an item under the finger/cursor.
|
boolean |
isPrimaryButtonPressed() |
boolean |
isSecondaryButtonPressed() |
boolean |
isShiftKeyDown() |
String |
toString()
Returns a string representation of the object.
|
public MotionInputEvent(MotionEvent event, RecyclerView view)
public boolean isMouseEvent()
isMouseEvent
in interface Events.InputEvent
public boolean isPrimaryButtonPressed()
isPrimaryButtonPressed
in interface Events.InputEvent
public boolean isSecondaryButtonPressed()
isSecondaryButtonPressed
in interface Events.InputEvent
public boolean isShiftKeyDown()
isShiftKeyDown
in interface Events.InputEvent
public boolean isActionDown()
Events.InputEvent
isActionDown
in interface Events.InputEvent
public boolean isActionUp()
Events.InputEvent
isActionUp
in interface Events.InputEvent
public Point getOrigin()
getOrigin
in interface Events.InputEvent
public boolean isOverItem()
Events.InputEvent
isOverItem
in interface Events.InputEvent
public int getItemPosition()
Events.InputEvent
getItemPosition
in interface Events.InputEvent
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())