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

Recyclerview items not aligning properly when using flexBasisPercent with FlexBoxItemDecoration/Margin #483

Open
johnryM opened this issue Feb 4, 2019 · 0 comments

Comments

@johnryM
Copy link

johnryM commented Feb 4, 2019

I'm using a FlexboxLayoutManager and setting flexBasisPercent to 0.5 in the viewholder to create a 2 column recyclerview.

When I try to add spacing between the recyclerview items via a FlexboxItemDecoration and adding a margin to recyclerview, some of the rows contain an item that is slightly wider than the rest which creates a row that only contains one item and a massive gap like in the image below:

image

Lowering the value in flexBasisPercent to 0.45 alleviates this issue but I was wondering if there is a way to keep it rounded to 0.5 and account for margin/dividers. Is this intended behaviour or is there some value clamping somewhere?

I'm running my sample app on a API 23 Tablet Emulator using using version 1.0.0

sample - https://github.com/johnryM/flexbox-recyclerview-sample

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