recycleadapter/src/main/java/com/kevadiyakrunalk/recycleadapter/swipeable/RecyclerViewSwipeManager.java
public void attachRecyclerView(@NonNull RecyclerView rv) {
        if (isReleased()) {
            throw new IllegalStateException("Accessing released object");
        }

        if (mRecyclerView != null) {
            throw new IllegalStateException("RecyclerView instance has already been set");
        }

        final int layoutOrientation = CustomRecyclerViewUtils.getOrientation(rv);
        if (layoutOrientation == CustomRecyclerViewUtils.ORIENTATION_UNKNOWN) {
            throw new IllegalStateException("failed to determine layout orientation");
        }

        mRecyclerView = rv;
        mRecyclerView.addOnItemTouchListener(mInternalUseOnItemTouchListener);

        final ViewConfiguration vc = ViewConfiguration.get(rv.getContext());

        mTouchSlop = vc.getScaledTouchSlop();
        mMinFlingVelocity = vc.getScaledMinimumFlingVelocity();
        mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity();
        mSwipeThresholdDistance = (int) (mTouchSlop * MIN_DISTANCE_TOUCH_SLOP_MUL);

        mItemSlideAnimator = new ItemSlidingAnimator(mWrapperAdapter);
        mItemSlideAnimator.setImmediatelySetTranslationThreshold(
                (int) (rv.getResources().getDisplayMetrics().density * SLIDE_ITEM_IMMEDIATELY_SET_TRANSLATION_THRESHOLD_DP + 0.5f));

        mSwipeHorizontal = (layoutOrientation == CustomRecyclerViewUtils.ORIENTATION_VERTICAL);
        mHandler = new InternalHandler(this);
    }
/**
     * <p>Attaches {@link RecyclerView} instance.</p>
     * <p>Before calling this method, the target {@link RecyclerView} must set
     * the wrapped adapter instance which is returned by the
     * {@link #createWrappedAdapter(RecyclerView.Adapter)} method.</p>
     *
     * @param rv The {@link RecyclerView} instance
     */
Attaches  RecyclerView instance.
Before calling this method, the target  RecyclerView must set
the wrapped adapter instance which is returned by the
#createWrappedAdapter(RecyclerView.Adapter) method.

@param rv The  RecyclerView instance
Attaches RecyclerView instance . Before calling this method the target RecyclerView must set the wrapped adapter instance which is returned by the #createWrappedAdapter ( RecyclerView . Adapter ) method . @param rv The RecyclerView instance
public void attachRecyclerView(@NonNull RecyclerView rv) {
        if (isReleased()) {
            throw new IllegalStateException("Accessing released object");
        }
        if (mRecyclerView != null) {
            throw new IllegalStateException("RecyclerView instance has already been set");
        }
        final int layoutOrientation = CustomRecyclerViewUtils.getOrientation(rv);
        if (layoutOrientation == CustomRecyclerViewUtils.ORIENTATION_UNKNOWN) {
            throw new IllegalStateException("failed to determine layout orientation");
        }
        mRecyclerView = rv;
        mRecyclerView.addOnItemTouchListener(mInternalUseOnItemTouchListener);
        final ViewConfiguration vc = ViewConfiguration.get(rv.getContext());
        mTouchSlop = vc.getScaledTouchSlop();
        mMinFlingVelocity = vc.getScaledMinimumFlingVelocity();
        mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity();
        mSwipeThresholdDistance = (int) (mTouchSlop * MIN_DISTANCE_TOUCH_SLOP_MUL);
        mItemSlideAnimator = new ItemSlidingAnimator(mWrapperAdapter);
        mItemSlideAnimator.setImmediatelySetTranslationThreshold(
                (int) (rv.getResources().getDisplayMetrics().density * SLIDE_ITEM_IMMEDIATELY_SET_TRANSLATION_THRESHOLD_DP + 0.5f));
        mSwipeHorizontal = (layoutOrientation == CustomRecyclerViewUtils.ORIENTATION_VERTICAL);
        mHandler = new InternalHandler(this);
    }
public void attachRecyclerView ( @ NonNull RecyclerView rv ) { if ( isReleased ( ) ) { throw new IllegalStateException ( "Accessing released object" ) ; } if ( mRecyclerView != null ) { throw new IllegalStateException ( "RecyclerView instance has already been set" ) ; } final int layoutOrientation = CustomRecyclerViewUtils . getOrientation ( rv ) ; if ( layoutOrientation == CustomRecyclerViewUtils . ORIENTATION_UNKNOWN ) { throw new IllegalStateException ( "failed to determine layout orientation" ) ; } mRecyclerView = rv ; mRecyclerView . addOnItemTouchListener ( mInternalUseOnItemTouchListener ) ; final ViewConfiguration vc = ViewConfiguration . get ( rv . getContext ( ) ) ; mTouchSlop = vc . getScaledTouchSlop ( ) ; mMinFlingVelocity = vc . getScaledMinimumFlingVelocity ( ) ; mMaxFlingVelocity = vc . getScaledMaximumFlingVelocity ( ) ; mSwipeThresholdDistance = ( int ) ( mTouchSlop * MIN_DISTANCE_TOUCH_SLOP_MUL ) ; mItemSlideAnimator = new ItemSlidingAnimator ( mWrapperAdapter ) ; mItemSlideAnimator . setImmediatelySetTranslationThreshold ( ( int ) ( rv . getResources ( ) . getDisplayMetrics ( ) . density * SLIDE_ITEM_IMMEDIATELY_SET_TRANSLATION_THRESHOLD_DP + 0.5f ) ) ; mSwipeHorizontal = ( layoutOrientation == CustomRecyclerViewUtils . ORIENTATION_VERTICAL ) ; mHandler = new InternalHandler ( this ) ; }
<p>Attaches {@link RecyclerView} instance.</p>
 <p>Before calling this method, the target {@link RecyclerView} must set
 the wrapped adapter instance which is returned by the
 {@link #createWrappedAdapter(RecyclerView.Adapter)} method.</p>
<p > Attaches { @link RecyclerView } instance . < / p > <p > Before calling this method the target { @link RecyclerView } must set the wrapped adapter instance which is returned by the { @link #createWrappedAdapter ( RecyclerView . Adapter ) } method . < / p >