Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

OnChildAttachStateChangeListener

interface OnChildAttachStateChangeListener
androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener

A Listener interface that can be attached to a RecylcerView to get notified whenever a ViewHolder is attached to or detached from RecyclerView.

Summary

Public methods
abstract Unit

Called when a view is detached from RecyclerView.

abstract Unit

Called when a view is attached to the RecyclerView.

Public methods

onChildViewDetachedFromWindow

abstract fun onChildViewDetachedFromWindow(@NonNull view: View): Unit

Called when a view is detached from RecyclerView.

Parameters
view View: The View which is being detached from the RecyclerView

onChildViewAttachedToWindow

abstract fun onChildViewAttachedToWindow(@NonNull view: View): Unit

Called when a view is attached to the RecyclerView.

Parameters
view View: The View which is attached to the RecyclerView