Stay organized with collections
Save and categorize content based on your preferences.
RecyclerListener
interface RecyclerListener
A RecyclerListener is used to receive a notification whenever a View is placed inside the RecycleBin's scrap heap. This listener is used to free resources associated to Views placed in the RecycleBin.
Summary
Public methods |
abstract Unit |
Indicates that the specified View was moved into the recycler's scrap heap.
|
Public methods
onMovedToScrapHeap
abstract fun onMovedToScrapHeap(view: View!): Unit
Indicates that the specified View was moved into the recycler's scrap heap. The view is not displayed on screen any more and any expensive resource associated with the view should be discarded.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AbsListView.RecyclerListener\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nRecyclerListener\n================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/widget/AbsListView.RecyclerListener \"View this page in Java\") \n\n```\ninterface RecyclerListener\n```\n\n|--------------------------------------------------|\n| [android.widget.AbsListView.RecyclerListener](#) |\n\nA RecyclerListener is used to receive a notification whenever a View is placed inside the RecycleBin's scrap heap. This listener is used to free resources associated to Views placed in the RecycleBin.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onMovedToScrapHeap](#onMovedToScrapHeap(android.view.View))`(`view:` `[View](../view/View.html#)!`)` Indicates that the specified View was moved into the recycler's scrap heap. |\n\nPublic methods\n--------------\n\n### onMovedToScrapHeap\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onMovedToScrapHeap(view: View!): Unit\n```\n\nIndicates that the specified View was moved into the recycler's scrap heap. The view is not displayed on screen any more and any expensive resource associated with the view should be discarded.\n\n| Parameters ||\n|--------|------------------------------|\n| `view` | [View](../view/View.html#)!: |"]]