-
public interface RecyclerView.RecyclerListener
A RecyclerListener can be set on a RecyclerView to receive messages whenevera view is recycled.
-
-
Method Summary
Modifier and Type Method Description abstract void
onViewRecycled(@NonNull() 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 andsending it to RecycledViewPool. -
-
Method Detail
-
onViewRecycled
abstract void onViewRecycled(@NonNull() 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 andsending it to RecycledViewPool. This way, if ViewHolder was holding valid informationbefore being recycled, you can call getBindingAdapterPosition to getits adapter position.
- Parameters:
holder
- The ViewHolder containing the view that was recycled
-
-
-
-