INNER CODE UNIT · Java

reset

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

    private void reset() {
        //Animate mobile view back to original position
        final View view = getViewByPosition(mobileViewCurrentPos);
        if (view != null && mobileView != null) {
            float y = getViewRawCoords(view)[1];
            mobileView.animate().y(y).setDuration(MOVE_DURATION).setListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationEnd(Animator animation) {
                    view.setVisibility(View.VISIBLE);
                    if (mobileView != null) {
                        ViewGroup parent = (ViewGroup) mobileView.getParent();
                        parent.removeView(mobileView);
                        mobileView = null;
                    }

                }
            });

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…