이제 Android 11 개발자 프리뷰를 사용할 수 있습니다. 테스트해 보고 의견을 공유하세요.

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