-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
FlexboxItemDecoration not correct in FlexboxItemDecoration #336
Comments
Thanks for filing this. As you say it looks like the decoration length should be calculated before calling the isWrapRequired method |
Thanks , and i am now working on it. |
That would be great. Thanks for doing that. |
This is not the best sulotion,but now it can resolve the problem. This problem is not so easy. Calculate the decoration is conflict with the method isWrapRequired,and i can not reuse the view for both calculate the decoraion and isWrapRequired. So this solution is just for get the decoration with the view,and the capability maybe not so good.But it certenly solve the problem.
Are there any timely plans for this to get merged and making a new release? |
Sorry at this moment, there isn't a fixed plan when this is fixed. |
That's sad because right now Item Decorations can't be used with Flexbox Layout Manager |
Let me try to fix it before too long. |
is it still ? I use v0.3.2 |
I'm also encountering this issue. What's odd is that if I set my (TextView) items to be single line, the text gets cut off, but the textview itself appears to be the correct size. Sort of like this: [an-_____]. |
Issues and steps to reproduce
if i do not use decoration,the flexboxlayoutmanager show correct,if i user decoration,the each item of recycle view do not show fully.
Like this:
not use decoration
Text1Text2Text3Text4
Text5Text6Text7Text8
use decoration
Tex... Tex... Tex... Tex...
Tex... Tex... Tex... Tex...
Expected behavior
like this:
Text1 Text2 Text3
Text4 Text5 Text6
Text7 Text8
Version of the flexbox library
e.g. 0.2.6, 0.3.0-alpha3
Link to code
I read the source code ,and i think there maybe have problem.
in FlexBoxHelper->isWrapRequired method
int decorationLength =
mFlexContainer.getDecorationLengthMainAxis(view, index, indexInFlexLine);
this line return 0 but i set the decoration.
And i find must invoke calculateItemDecorationsForChild(view,rect) first, otherwise can not get the correct decoration
The text was updated successfully, but these errors were encountered: