RecyclerView.OnChildAttachStateChangeListener


public interface RecyclerView.OnChildAttachStateChangeListener

Known direct subclasses
ItemTouchHelper

This is a utility class to add swipe to dismiss and drag &drop support to RecyclerView.


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 void

Called when a view is attached to the RecyclerView.

abstract void

Called when a view is detached from RecyclerView.

Public methods

onChildViewAttachedToWindow

Added in 1.0.0
abstract void onChildViewAttachedToWindow(@NonNull View view)

Called when a view is attached to the RecyclerView.

Parameters
@NonNull View view

The View which is attached to the RecyclerView

onChildViewDetachedFromWindow

Added in 1.0.0
abstract void onChildViewDetachedFromWindow(@NonNull View view)

Called when a view is detached from RecyclerView.

Parameters
@NonNull View view

The View which is being detached from the RecyclerView