protected final void addUnusedView ( @ NonNull final View view , final int viewType ) { if ( useCache ) { if ( unusedViews == null ) { unusedViews = new SparseArray <> ( adapter . getViewTypeCount ( ) ) ; } Queue < View > queue = unusedViews . get ( viewType ) ; if ( queue == null ) { queue = new LinkedList <> ( ) ; unusedViews . put ( viewType , queue ) ; } queue . add ( view ) ; } }
Adds an unused view to the cache .