Most visited

Recently visited

RecyclerView.RecycledViewPool

public static class RecyclerView.RecycledViewPool
extends Object

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


RecycledViewPool可让您在多个RecyclerView之间共享视图。

如果您想要跨RecyclerView回收视图,请创建一个RecycledViewPool实例并使用 setRecycledViewPool(RecycledViewPool)

如果您没有提供池,RecyclerView会自动创建一个池。

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!