Most visited

Recently visited

RecyclerView.RecyclerListener

public static interface RecyclerView.RecyclerListener

android.support.v7.widget.RecyclerView.RecyclerListener


RecyclerListener可以设置在RecyclerView上,以便在视图回收时接收消息。

也可以看看:

Summary

Public methods

abstract void onViewRecycled(RecyclerView.ViewHolder holder)

只要ViewHolder中的视图被回收,就会调用此方法。

Public methods

onViewRecycled

void onViewRecycled (RecyclerView.ViewHolder holder)

只要ViewHolder中的视图被回收,就会调用此方法。 RecyclerView在清除ViewHolder的内部数据并将其发送到RecycledViewPool之前调用此方法。 这样,如果ViewHolder在回收之前保存有效信息,则可以致电getAdapterPosition()以获取其适配器位置。

Parameters
holder RecyclerView.ViewHolder: The ViewHolder containing the view that was recycled

Hooray!