Litho didn't work with Viewpager2
jingweihu opened this issue · 1 comments
- I have searched existing issues and this is not a duplicate
Version
litho_version = 0.39.0
***Add the version of the litho packages you use. You can paste the dependency
implementation "com.facebook.litho:litho-fresco:${rootProject.ext.litho_version}"
implementation "com.facebook.litho:litho-core:${rootProject.ext.litho_version}"
implementation "com.facebook.litho:litho-widget:${rootProject.ext.litho_version}"
implementation "com.facebook.litho:litho-sections-core:${rootProject.ext.litho_version}"
implementation "com.facebook.litho:litho-sections-widget:${rootProject.ext.litho_version}"
compileOnly "com.facebook.litho:litho-sections-annotations:${rootProject.ext.litho_version}"
Issues and Steps to Reproduce
All the component will be empty if I create them in fragments that are embedded in ViewPager2
Expected Behavior
Component should be shown
LithoView can't be rendered inside another ScrollView (aka RecyclerView), That's what I learned from a long trial and error session.
But you could play around with incrementalMount(false)
. I didn't like the idea of doing something not default on a production code.