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

Support for setting the item spacing of a carousel #514

Closed
pwillmann opened this issue Aug 27, 2018 · 1 comment · Fixed by #528
Closed

Support for setting the item spacing of a carousel #514

pwillmann opened this issue Aug 27, 2018 · 1 comment · Fixed by #528

Comments

@pwillmann
Copy link
Contributor

Currently it is possible to set the Padding of a carousel via a resource or dp while the item spacing can only be set as part of the Carousel.Padding object and only directly in pixels. Would be great to be able to set the item spacing as dp or resource too.

As i understand it's only a matter of adding a @ModelProp annotation right?

@elihart
Copy link
Contributor

elihart commented Aug 30, 2018

Yep, I've thought about this too. I left it off because it adds a lot of extra size to the Padding class. I would be open to updating the class to allow it though, maybe something like Padding.dp(4). or Padding.resource(R.dimen.foo)

You could add a new property with @ModelProp, but you'd have to be careful with that because having two @ModelProp setting the same underlying value can conflict.

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 a pull request may close this issue.

2 participants