public class ReorderWithHandlesBehavior extends ItemReorderBehavior
ItemReorderBehavior.ItemReorderListener
Constructor and Description |
---|
ReorderWithHandlesBehavior(int handleId) |
Modifier and Type | Method and Description |
---|---|
View |
getReorderHandleOverride(ViewGroup itemView)
Gets an alternative
View to be used as a reorder handle. |
boolean |
isInProgress()
Returns true if the current behavior is in progress.
|
boolean |
onActionUpOrCancel(boolean isCanceled)
Called when a previous gesture ends on up or cancel.
|
void |
onAttached(RadListView owner)
Called when the behavior is attached to
RadListView with
addBehavior(ListViewBehavior). |
void |
onDetached(RadListView listView)
Called when the behavior is detached to
RadListView with
removeBehavior(ListViewBehavior). |
boolean |
onFling(MotionEvent motionEvent,
MotionEvent motionEvent2,
float v,
float v2)
Called when the fling gesture is detected by
RadListView 's
ListViewGestureListener . |
void |
onLongPress(MotionEvent motionEvent)
Called when the long press gesture is detected by
RadListView 's
ListViewGestureListener . |
void |
onLongPressDrag(float startX,
float startY,
float currentX,
float currentY)
Called when the drag gesture is detected by
RadListView 's
ListViewGestureListener which started with long press. |
boolean |
onLongPressDragEnded(boolean isCanceled)
Called when a current gesture combination of long press and drag ends on up or cancel.
|
boolean |
onShortPressDrag(float startX,
float startY,
float currentX,
float currentY)
Called when the drag gesture is detected by
RadListView 's
ListViewGestureListener . |
View |
resolveHandleViewForCoordinates(float startX,
float startY)
Returns a
View that contains the point defined by the provided coordinates. |
addListener, getScrollValue, onDispatchDraw, removeListener, setScrollValue
bindViewHolder, createViewHolder, getItemViewType, managesViewHolders, onInterceptTouchEvent, onLayout, onScrolled, onTapUp
public boolean onShortPressDrag(float startX, float startY, float currentX, float currentY)
ListViewBehavior
RadListView
's
ListViewGestureListener
.onShortPressDrag
in class ListViewBehavior
startX
- the x coordinate where the gesture startedstartY
- the y coordinate where the gesture startedcurrentX
- the x coordinate where the gesture occurring nowcurrentY
- the y coordinate where the gesture occurring nowpublic boolean onActionUpOrCancel(boolean isCanceled)
ListViewBehavior
onActionUpOrCancel
in class ListViewBehavior
isCanceled
- whether the gesture was cancelledpublic boolean isInProgress()
ListViewBehavior
isInProgress
in class ItemReorderBehavior
public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float v, float v2)
ListViewBehavior
RadListView
's
ListViewGestureListener
.onFling
in class ItemReorderBehavior
motionEvent
- The first down motion event that started the fling.motionEvent2
- The move motion event that triggered the current onFling.v
- The velocity of this fling measured in pixels per second
along the x axis.v2
- The velocity of this fling measured in pixels per second
along the y axis.public void onAttached(RadListView owner)
ListViewBehavior
RadListView
with
addBehavior(ListViewBehavior).onAttached
in class ItemReorderBehavior
owner
- The parent list viewpublic void onDetached(RadListView listView)
ListViewBehavior
RadListView
with
removeBehavior(ListViewBehavior).onDetached
in class ListViewBehavior
listView
- The parent list viewpublic void onLongPress(MotionEvent motionEvent)
ListViewBehavior
RadListView
's
ListViewGestureListener
.onLongPress
in class ItemReorderBehavior
motionEvent
- The motion eventpublic void onLongPressDrag(float startX, float startY, float currentX, float currentY)
ListViewBehavior
RadListView
's
ListViewGestureListener
which started with long press.onLongPressDrag
in class ItemReorderBehavior
startX
- the x coordinate where the gesture startedstartY
- the y coordinate where the gesture startedcurrentX
- the x coordinate where the gesture occurring nowcurrentY
- the y coordinate where the gesture occurring nowpublic boolean onLongPressDragEnded(boolean isCanceled)
ListViewBehavior
onLongPressDragEnded
in class ItemReorderBehavior
isCanceled
- whether the gesture was cancelledpublic View resolveHandleViewForCoordinates(float startX, float startY)
View
that contains the point defined by the provided coordinates.startX
- the x-coordinate of the point.startY
- the y-coordinate of the point.View
that contains the point.