이제 Android 11 개발자 프리뷰를 사용할 수 있습니다. 테스트해 보고 의견을 공유하세요.
added in version 22.1.0
belongs to Maven artifact com.android.support:recyclerview-v7:28.0.0-alpha1

RecyclerView.RecyclerListener

public static interface RecyclerView.RecyclerListener

android.support.v7.widget.RecyclerView.RecyclerListener


A RecyclerListener can be set on a RecyclerView to receive messages whenever a view is recycled.

Summary

Public methods

abstract void onViewRecycled(RecyclerView.ViewHolder holder)

This method is called whenever the view in the ViewHolder is recycled.

Public methods

onViewRecycled

added in version 22.1.0
void onViewRecycled (RecyclerView.ViewHolder holder)

This method is called whenever the view in the ViewHolder is recycled. RecyclerView calls this method right before clearing ViewHolder's internal data and sending it to RecycledViewPool. This way, if ViewHolder was holding valid information before being recycled, you can call getAdapterPosition() to get its adapter position.

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