Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the maximum number of views to hold in the pool before discarding #777

Open
1 task done
mnayef95 opened this issue Mar 16, 2021 · 0 comments
Open
1 task done

Comments

@mnayef95
Copy link

mnayef95 commented Mar 16, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant