Skip to content

Instantly share code, notes, and snippets.

@sergei-lapin
Created August 5, 2021 06:56
Show Gist options
  • Select an option

  • Save sergei-lapin/4d1eabbd69b636c7b5c506d245543047 to your computer and use it in GitHub Desktop.

Select an option

Save sergei-lapin/4d1eabbd69b636c7b5c506d245543047 to your computer and use it in GitHub Desktop.
putRecycledView
override fun putRecycledView(scrap: RecyclerView.ViewHolder) {
val viewType = scrap.itemViewType
val maxRecycledViews = recycledViewsBounds.getOrPut(viewType) { defaultMaxRecycledViews }
setMaxRecycledViews(viewType, maxRecycledViews)
super.putRecycledView(scrap)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment