@@ -58,7 +58,7 @@ public interface ReorderListener {
58
58
* Called when the user drag event ends, informing the listener of the changed position
59
59
*
60
60
* @param originalPosition The position the dragged view started at
61
- * @param newPosition The position the dragged view should be saved as
61
+ * @param newPosition The position the dragged view should be saved as
62
62
*/
63
63
void onItemReordered (int originalPosition , int newPosition );
64
64
@@ -67,7 +67,7 @@ public interface ReorderListener {
67
67
* actually updating the backing data structure (e.g. calling swap on a {@link com.devbrackets.android.recyclerext.adapter.RecyclerCursorAdapter})
68
68
*
69
69
* @param originalPosition The position the dragged view started at
70
- * @param newPosition The position the dragged view should be saved as
70
+ * @param newPosition The position the dragged view should be saved as
71
71
*/
72
72
void onItemPostReordered (int originalPosition , int newPosition );
73
73
}
@@ -138,8 +138,8 @@ public void getItemOffsets(Rect outRect, View view, RecyclerView parent, Recycle
138
138
139
139
/**
140
140
* This will determine two things.
141
- * 1. If we need to handle the touch event
142
- * 2. If reordering needs to start due to dragHandle being clicked
141
+ * 1. If we need to handle the touch event
142
+ * 2. If reordering needs to start due to dragHandle being clicked
143
143
*/
144
144
@ Override
145
145
public boolean onInterceptTouchEvent (RecyclerView recyclerView , MotionEvent event ) {
@@ -335,7 +335,7 @@ public LayoutOrientation getOrientation() {
335
335
* Manually starts the reorder process for the specified view. This should not be used if the {@link #setDragHandleId(int)} is
336
336
* set and should control the reordering.
337
337
*
338
- * @param view The View to start reordering
338
+ * @param view The View to start reordering
339
339
* @param startMotionEvent The MotionEvent that starts the reorder
340
340
*/
341
341
public void startReorder (View view , @ Nullable MotionEvent startMotionEvent ) {
@@ -453,7 +453,7 @@ public int calculateNewPosition() {
453
453
* top when Vertical and left when Horizontal.
454
454
*
455
455
* @param childPosition The position of the view in the RecyclerView
456
- * @param draggedUp True if the view has been moved up or to the left
456
+ * @param draggedUp True if the view has been moved up or to the left
457
457
*/
458
458
private void updateNewViewStart (int childPosition , boolean draggedUp ) {
459
459
View view = recyclerView .getLayoutManager ().getChildAt (childPosition );
@@ -481,10 +481,10 @@ private void updateFloatingItemCenter() {
481
481
* This happens when the dragging view starts above the <code>view</code> and has been dragged
482
482
* below it, or vice versa.
483
483
*
484
- * @param view The view to compare with the dragging items current and original positions
484
+ * @param view The view to compare with the dragging items current and original positions
485
485
* @param itemPosition The position for the <code>view</code>
486
- * @param middle The center of the floating item
487
- * @param outRect The {@link Rect} to update the position in
486
+ * @param middle The center of the floating item
487
+ * @param outRect The {@link Rect} to update the position in
488
488
*/
489
489
private void setVerticalOffsets (View view , int itemPosition , PointF middle , Rect outRect ) {
490
490
if (orientation == LayoutOrientation .HORIZONTAL ) {
@@ -515,10 +515,10 @@ private void setVerticalOffsets(View view, int itemPosition, PointF middle, Rect
515
515
* This happens when the dragging view starts before the <code>view</code> and has been dragged
516
516
* after it, or vice versa.
517
517
*
518
- * @param view The view to compare with the dragging items current and original positions
518
+ * @param view The view to compare with the dragging items current and original positions
519
519
* @param itemPosition The position for the <code>view</code>
520
- * @param middle The center of the floating item
521
- * @param outRect The {@link Rect} to update the position in
520
+ * @param middle The center of the floating item
521
+ * @param outRect The {@link Rect} to update the position in
522
522
*/
523
523
private void setHorizontalOffsets (View view , int itemPosition , PointF middle , Rect outRect ) {
524
524
if (orientation == LayoutOrientation .VERTICAL ) {
@@ -597,20 +597,20 @@ private void performHorizontalEdgeScroll(PointF fingerPosition) {
597
597
* view being dragged.
598
598
*
599
599
* @param fingerPosition The current position of the dragging finger
600
- * @param viewMiddle The center of the view being dragged
600
+ * @param viewMiddle The center of the view being dragged
601
601
*/
602
602
private void updateVerticalBounds (PointF fingerPosition , PointF viewMiddle ) {
603
603
if (orientation == LayoutOrientation .HORIZONTAL ) {
604
604
return ;
605
605
}
606
606
607
- floatingItemBounds .top = (int )fingerPosition .y ;
607
+ floatingItemBounds .top = (int ) fingerPosition .y ;
608
608
if (fingerOffset != null ) {
609
609
floatingItemBounds .top += fingerOffset .y ;
610
610
}
611
611
612
612
if (floatingItemBounds .top < -viewMiddle .y ) {
613
- floatingItemBounds .top = -(int )viewMiddle .y ;
613
+ floatingItemBounds .top = -(int ) viewMiddle .y ;
614
614
}
615
615
616
616
floatingItemBounds .bottom = floatingItemBounds .top + floatingItemStartingBounds .height ();
@@ -621,20 +621,20 @@ private void updateVerticalBounds(PointF fingerPosition, PointF viewMiddle) {
621
621
* view being dragged.
622
622
*
623
623
* @param fingerPosition The current position of the dragging finger
624
- * @param viewMiddle The center of the view being dragged
624
+ * @param viewMiddle The center of the view being dragged
625
625
*/
626
626
private void updateHorizontalBounds (PointF fingerPosition , PointF viewMiddle ) {
627
627
if (orientation == LayoutOrientation .VERTICAL ) {
628
628
return ;
629
629
}
630
630
631
- floatingItemBounds .left = (int )fingerPosition .x ;
631
+ floatingItemBounds .left = (int ) fingerPosition .x ;
632
632
if (fingerOffset != null ) {
633
633
floatingItemBounds .left += fingerOffset .x ;
634
634
}
635
635
636
636
if (floatingItemBounds .left < -viewMiddle .x ) {
637
- floatingItemBounds .left = -(int )viewMiddle .x ;
637
+ floatingItemBounds .left = -(int ) viewMiddle .x ;
638
638
}
639
639
640
640
floatingItemBounds .right = floatingItemBounds .left + floatingItemStartingBounds .width ();
0 commit comments