How to change the maximum number of views to hold in the pool before discarding
- Dominant language
- Kotlin
- Stars
- 7.8k
- Forks
- 768
- PR merge metrics
- No merged PRs in 30d
Description
- [x] I have searched [existing issues](https://github.com/facebook/litho/issues) and this is not a duplicate
## Version
```
api 'com.facebook.litho:litho-core:0.38.0'
api 'com.facebook.litho:litho-widget:0.38.0'
api 'com.facebook.fbjni:fbjni:0.0.2'
kapt 'com.facebook.litho:litho-processor:0.38.0'
// Native C/C++ code loader for Android
api 'com.facebook.soloader:soloader:0.9.0'
// Litho sections an alternative to Android RecyclerView
api 'com.facebook.litho:litho-sections-core:0.38.0'
api 'com.facebook.litho:litho-sections-widget:0.38.0'
compileOnly 'com.facebook.litho:litho-sections-annotations:0.38.0'
kapt 'com.facebook.litho:litho-sections-processor:0.38.0'
```
In the recycler view we can set something like this `recyclerView.recycledViewPool.setMaxRecycledViews(AD_TYPE, 50)` to indicate the recycler view about how many view holders should be held in the pool with the type `AD_TYPE`.
Also, I can set a certain view holder to be not recyclable by this `setIsRecyclable(false)`.
How I can do the same thing with litho?
Contributor guide
Assessment
This issue has not been assessed yet.