public static class RecyclerView.RecycledViewPool
extends Object
java.lang.Object | |
↳ | android.support.v7.widget.RecyclerView.RecycledViewPool |
RecycledViewPool可让您在多个RecyclerView之间共享视图。
如果您想要跨RecyclerView回收视图,请创建一个RecycledViewPool实例并使用 setRecycledViewPool(RecycledViewPool)
。
如果您没有提供池,RecyclerView会自动创建一个池。
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
|
RecyclerView.RecycledViewPool ()
void clear ()
RecyclerView.ViewHolder getRecycledView (int viewType)
Parameters | |
---|---|
viewType |
int
|
Returns | |
---|---|
RecyclerView.ViewHolder |
void putRecycledView (RecyclerView.ViewHolder scrap)
Parameters | |
---|---|
scrap |
RecyclerView.ViewHolder
|
void setMaxRecycledViews (int viewType, int max)
Parameters | |
---|---|
viewType |
int
|
max |
int
|