Closed liao123abc closed 8 years ago
I need a bit more information here. Your layoutDecorated()
numbers don't make sense to me. It's note entirely clear what I'm looking at in that log. You mentioned it was during a fling upwards, but what line of the FGLM code is being logged there?
If the first number in each row is the adapter position (just a guess), then the bottom
values should increase with each row (y-coordinate is positive in the downward direction), but they get more negative as the position number goes up. So either this log is a concatenation of different snippets in a way that I cannot work out, or one of these values is being logged incorrectly.
Dear Dear Dave Smith:
Great job!
But could you please help me about some cofusions?
Currently I dive into your code of the FixedGirdLayoutManager, it confused me.
To make it simple, suppose it only scroll vertically.
When slowly scrolling,RecyclerView will tell the manager to do something by : scrollVerticallyBy()
and then detach all the views then calculate the visible rows and columns then find the right child views that are still in the visible area. If no view is ready for the slot, then create a new one.
This is understandable.
But with a fling gesture, it seems that the the old and new created child views are positioned in a quite large negtive Pos by:
old views: 1.offsetChildrenVertical(delta); in scrollVerticallyBy() of fixedGridLayoutManager
new views: 2.layoutDecorated(); in fillGrid() of fixedGridLayoutManager
I have log them out,Plz have a look at the log :
layoutDecorated.png:
offsetChildrenVertical.png:
This confused me for a long time , I cannot figure it out: When fling the recyclerview vertically bottom up;
Please, I beg for your answers. I have been confusing by these questions for a long time.