The Android Developer Challenge is back! Submit your idea before December 2.

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 attached to the RecyclerView.

abstract Unit

Called when a view is detached from RecyclerView.

Public methods

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

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