public fun interface PoolingContainerListener


A callback to inform a child View within a container that manages its children's lifecycle outside of the View hierarchy (such as a RecyclerView) when that child should dispose any resources it holds.

This callback is not necessarily triggered if the pooling container is disassociating the View from a particular piece of data (that is, it is not an "unbind listener"). It is intended for expensive resources that need to be cached across data items, but need a signal to be disposed of.

Summary

Public methods

abstract void

Signals that this view should dispose any resources it may be holding onto, because its container is either discarding the View or has been removed from the hierarchy itself.

Public methods

onRelease

@UiThread
abstract void onRelease()

Signals that this view should dispose any resources it may be holding onto, because its container is either discarding the View or has been removed from the hierarchy itself.

Note: This may be called multiple times. A call to this method does not mean the View will not later be reattached.