Most visited

Recently visited

RecyclerView.RecycledViewPool

public static class RecyclerView.RecycledViewPool
extends Object

java.lang.Object
   ↳ android.support.v7.widget.RecyclerView.RecycledViewPool


RecycledViewPool lets you share Views between multiple RecyclerViews.

If you want to recycle views across RecyclerViews, create an instance of RecycledViewPool and use setRecycledViewPool(RecycledViewPool).

RecyclerView automatically creates a pool for itself if you don't provide one.

Summary

Public constructors

RecyclerView.RecycledViewPool()

Public methods

void clear()
RecyclerView.ViewHolder getRecycledView(int viewType)
void putRecycledView(RecyclerView.ViewHolder scrap)
void setMaxRecycledViews(int viewType, int max)

Inherited methods

From class java.lang.Object

Public constructors

RecyclerView.RecycledViewPool

RecyclerView.RecycledViewPool ()

Public methods

clear

void clear ()

getRecycledView

RecyclerView.ViewHolder getRecycledView (int viewType)

Parameters
viewType int
Returns
RecyclerView.ViewHolder

putRecycledView

void putRecycledView (RecyclerView.ViewHolder scrap)

Parameters
scrap RecyclerView.ViewHolder

setMaxRecycledViews

void setMaxRecycledViews (int viewType, 
                int max)

Parameters
viewType int
max int

Hooray!