ScrapViews and View Cache

The Recycler has a 2-level View-Caching System. 1. Scrap Heap : A lightweight collection where views can be directly passed to the…

ScrapViews and View Cache

The Recycler has a 2-level View-Caching System.
1. Scrap Heap : A lightweight collection where views can be directly passed to the LayoutManager wihout passing to the adapter again. The Views kept in Scrap heap are temporarily detached from the parent — RecyclerView, but will be reused in the same layout pass. These Views kept in Scrap Heap are Scrap Views.

2. Recycler Pool : It is a collection of Views that have incorrect data (data of a different position or id), so they will be passed to the adapter for rebinding the data to it ( by invoking RecyclerView.Adapter.bindViewHolder()).

They together make up View Cache.