INNER CODE UNIT · Java

belowPos

cymcsg/UltimateRecyclerView · UltimateRecyclerView/ultimaterecyclerview/src/main/java/com/marshalchen/ultimaterecyclerview/DragDropTouchListener.java:178

        int belowPos = pos + 1;

        View aboveView = getViewByPosition(abovePos);
        View belowView = getViewByPosition(belowPos);

        int mobileViewY = (int) mobileView.getY();

        if (aboveView != null && aboveView.getTop() > -1 && mobileViewY < aboveView.getTop()) {
            Log.d(LOG_TAG, String.format("Got aboveView with top = %s, for position = %s, %s", aboveView.getTop(), abovePos, aboveView));
            doSwitch(aboveView, pos, abovePos);
        }
        if (belowView != null && belowView.getTop() > -1 && mobileViewY > belowView.getTop()) {
            Log.d(LOG_TAG, String.format("Got belowView with top = %s, for position = %s, %s", belowView.getTop(), belowPos, belowView));
            doSwitch(belowView, pos, belowPos);
        }

    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…