@SuppressWarnings("deprecation") void scrapActiveViews(){
  final View[] activeViews=mActiveViews;
  final boolean hasListener=mRecyclerListener != null;
  final boolean multipleScraps=mViewTypeCount > 1;
  Stack<View> scrapViews=mCurrentScrap;
  final int count=activeViews.length;
  for (int i=count - 1; i >= 0; i--) {
    final View victim=activeViews[i];
    if (victim != null) {
      int whichScrap=((LayoutParams)victim.getLayoutParams()).viewType;
      activeViews[i]=null;
      if (!shouldRecycleViewType(whichScrap)) {
        if (whichScrap != ITEM_VIEW_TYPE_HEADER_OR_FOOTER) {
          removeDetachedView(victim,false);
        }
        continue;
      }
      if (multipleScraps) {
        scrapViews=mScrapViews[whichScrap];
      }
      dispatchFinishTemporaryDetach(victim);
      scrapViews.add(victim);
      if (hasListener) {
        mRecyclerListener.onMovedToScrapHeap(victim);
      }
      if (ViewDebug.TRACE_RECYCLER) {
        ViewDebug.trace(victim,ViewDebug.RecyclerTraceType.MOVE_FROM_ACTIVE_TO_SCRAP_HEAP,mFirstActivePosition + i,-1);
      }
    }
  }
  pruneScrapViews();
}

@ SuppressWarnings ( "deprecation" ) void scrapActiveViews ( ) { final View [ ] activeViews = mActiveViews ; final boolean hasListener = mRecyclerListener != null ; final boolean multipleScraps = mViewTypeCount > 1 ; Stack < View > scrapViews = mCurrentScrap ; final int count = activeViews . length ; for ( int i = count - 1 ; i >= 0 ; i -- ) { final View victim = activeViews [ i ] ; if ( victim != null ) { int whichScrap = ( ( LayoutParams ) victim . getLayoutParams ( ) ) . viewType ; activeViews [ i ] = null ; if ( ! shouldRecycleViewType ( whichScrap ) ) { if ( whichScrap != ITEM_VIEW_TYPE_HEADER_OR_FOOTER ) { removeDetachedView ( victim , false ) ; } continue ; } if ( multipleScraps ) { scrapViews = mScrapViews [ whichScrap ] ; } dispatchFinishTemporaryDetach ( victim ) ; scrapViews . add ( victim ) ; if ( hasListener ) { mRecyclerListener . onMovedToScrapHeap ( victim ) ; } if ( ViewDebug . TRACE_RECYCLER ) { ViewDebug . trace ( victim , ViewDebug . RecyclerTraceType . MOVE_FROM_ACTIVE_TO_SCRAP_HEAP , mFirstActivePosition + i , - 1 ) ; } } } pruneScrapViews ( ) ; }
move all views remaining in mactiveviews to mscrapviews .
