private void recycleByLayoutState(RecyclerView.Recycler recycler, LayoutState layoutState) {
        if (!layoutState.mRecycle) {
            return;
        }
        if (layoutState.mLayoutDirection == LayoutState.LAYOUT_START) {
            recycleViewsFromEnd(recycler, layoutState.mScrollingOffset);
        } else {
            recycleViewsFromStart(recycler, layoutState.mScrollingOffset);
        }
    }
private void recycleByLayoutState ( RecyclerView . Recycler recycler , LayoutState layoutState ) { if ( ! layoutState . mRecycle ) { return ; } if ( layoutState . mLayoutDirection == LayoutState . LAYOUT_START ) { recycleViewsFromEnd ( recycler , layoutState . mScrollingOffset ) ; } else { recycleViewsFromStart ( recycler , layoutState . mScrollingOffset ) ; } }
Helper method to call appropriate recycle method depending on current layout direction

@param recycler    Current recycler that is attached to RecyclerView
@param layoutState Current layout state. Right now, this object does not change but
we may consider moving it out of this view so passing around as a
parameter for now, rather than accessing {@link #mLayoutState}
@see #recycleViewsFromStart(RecyclerView.Recycler, int)
@see #recycleViewsFromEnd(RecyclerView.Recycler, int)
@see LayoutState#mLayoutDirection