issue for ViewPagerComponent
- 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
0.47.0
## Issues and Steps to Reproduce
litho ViewPagerComponent How to set height, like android's "wrap_content";
`heightDip(-1) or heightPx(-1)`
Setting the height equal to -1 does not seem to take effect;
`flexGrow(1)`
flexGrow method is effect,It will make the ViewPagerComponent fill the entire page, like android's match_parent
`RecyclerCollectionComponent.Builder` builder =RecyclerCollectionComponent
.create(c)
.flexGrow(1)
.heightDip(-1)
.heightPx(-1)
.disablePTR(true)
.section(
ViewPagerHelperSection.create(new SectionContext(c))
.delegateSection(dataDiffSection)
.pageSelectedEventEventHandler(
ViewPagerComponent.getPageSelectedEventHandler(c))
.initialPageIndex(initialPageIndex))
.eventsController(eventsController)
.recyclerConfiguration(recyclerConfiguration);`
## Expected Behavior
ViewPagerComponent height is determined by child layout height
Contributor guide
Assessment
This issue has not been assessed yet.