INNER CODE UNIT · Java
mobileViewY
cymcsg/UltimateRecyclerView · UltimateRecyclerView/ultimaterecyclerview/src/main/java/com/marshalchen/ultimaterecyclerview/DragDropTouchListener.java:167
int mobileViewY = mobileViewStartY + deltaY;
mobileView.setY(mobileViewY);
switchViewsIfNeeded();
scrollIfNeeded();
return true;
}
private void switchViewsIfNeeded() {
int pos = mobileViewCurrentPos;
int abovePos = pos - 1;
int belowPos = pos + 1;
View aboveView = getViewByPosition(abovePos);
View belowView = getViewByPosition(belowPos);
int mobileViewY = (int) mobileView.getY();