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

Use getWidth() and wrapping children to have consistent width #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

njpearman
Copy link

I was trying to get a full-width carousel, which wasn't that easy. This might be an improvement, as it assumes full width if no explicit width is set on the Carousel, and pulls that width through as appropriate if it is set.

The wrapping of the children means that they all have consistent width without the width having to be set explicitly. The only thing I don't like about this is creating another View node in the process.

This could be carried further by listening for orientation changes and then pushing the change in width down the component tree.

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

Successfully merging this pull request may close these issues.

1 participant