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

issue for ViewPagerComponent #1031

Open
1 task done
zhengzhong1 opened this issue Nov 1, 2024 · 0 comments
Open
1 task done

issue for ViewPagerComponent #1031

zhengzhong1 opened this issue Nov 1, 2024 · 0 comments

Comments

@zhengzhong1
Copy link

zhengzhong1 commented Nov 1, 2024

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.<T>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

@zhengzhong1 zhengzhong1 changed the title issue for view pager issue for ViewPagerComponent Nov 1, 2024
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