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

Fix the issue that values of the item decoration is misplaced #294

Merged
merged 1 commit into from
Jun 9, 2017

Conversation

thagikura
Copy link
Contributor

when the user scrolls the RecyclerView.

This was because of the reasons that:

  • FlexboxItemDecoration#isFirstItemInLine wasn't working correctly (it
    expected the flex lines only being calculated in the
    FlexboxHelper#calculateFlexLines, not expecting the already calculated
    flex lines).

  • In the layoutFlexLine method in FlexboxLayoutManager,
    calculateItemDecorationsForChild needed to be called before added to the
    RecyclerView because the view man be created in that method, in that
    case calcurated decoration's inset values are not set at the time of
    creation.

when the user scrolls the RecyclerView.

This was because of the reasons that:
- FlexboxItemDecoration#isFirstItemInLine wasn't working correctly (it
expected the flex lines only being calculated in the
FlexboxHelper#calculateFlexLines, not expecting the already calculated
flex lines).

- In the layoutFlexLine method in FlexboxLayoutManager,
calculateItemDecorationsForChild needed to be called before added to the
RecyclerView because the view man be created in that method, in that
case calcurated decoration's inset values are not set at the time of
creation.
@thagikura thagikura requested a review from yaraki June 9, 2017 08:52
@thagikura
Copy link
Contributor Author

@yaraki could you have a look?

@thagikura
Copy link
Contributor Author

This should fix #285

@thagikura thagikura merged commit abb745a into dev_recyclerview Jun 9, 2017
@thagikura thagikura deleted the fix_item_decoration_scrolling branch June 14, 2017 02:00
thagikura added a commit that referenced this pull request Jun 14, 2017
when the user scrolls the RecyclerView.

This was because of the reasons that:
- FlexboxItemDecoration#isFirstItemInLine wasn't working correctly (it
expected the flex lines only being calculated in the
FlexboxHelper#calculateFlexLines, not expecting the already calculated
flex lines).

- In the layoutFlexLine method in FlexboxLayoutManager,
calculateItemDecorationsForChild needed to be called before added to the
RecyclerView because the view man be created in that method, in that
case calcurated decoration's inset values are not set at the time of
creation.
thagikura added a commit that referenced this pull request Jun 15, 2017
when the user scrolls the RecyclerView.

This was because of the reasons that:
- FlexboxItemDecoration#isFirstItemInLine wasn't working correctly (it
expected the flex lines only being calculated in the
FlexboxHelper#calculateFlexLines, not expecting the already calculated
flex lines).

- In the layoutFlexLine method in FlexboxLayoutManager,
calculateItemDecorationsForChild needed to be called before added to the
RecyclerView because the view man be created in that method, in that
case calcurated decoration's inset values are not set at the time of
creation.
thagikura added a commit that referenced this pull request Jun 16, 2017
when the user scrolls the RecyclerView.

This was because of the reasons that:
- FlexboxItemDecoration#isFirstItemInLine wasn't working correctly (it
expected the flex lines only being calculated in the
FlexboxHelper#calculateFlexLines, not expecting the already calculated
flex lines).

- In the layoutFlexLine method in FlexboxLayoutManager,
calculateItemDecorationsForChild needed to be called before added to the
RecyclerView because the view man be created in that method, in that
case calcurated decoration's inset values are not set at the time of
creation.
thagikura added a commit that referenced this pull request Jun 28, 2017
when the user scrolls the RecyclerView.

This was because of the reasons that:
- FlexboxItemDecoration#isFirstItemInLine wasn't working correctly (it
expected the flex lines only being calculated in the
FlexboxHelper#calculateFlexLines, not expecting the already calculated
flex lines).

- In the layoutFlexLine method in FlexboxLayoutManager,
calculateItemDecorationsForChild needed to be called before added to the
RecyclerView because the view man be created in that method, in that
case calcurated decoration's inset values are not set at the time of
creation.
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.

2 participants