Adds a "LayoutRequest" object that can be used to request a re-layout of the recycler. This object can be used to save the state of the recycler and reload it later.
The layout manager now properly supports adapter data updates and orientation changes. I.E it tries to maintain the state of the layout, instead of re-laying out from 0.
:bug: Testing
Added checks to all of the scrollTo unit tests to make sure the topLeftIndex and bottomRightIndex are being properly set.
Also manually tested orientation changes using the following procedure:
Started off in portrait orientation.
Scrolled the items so half of item 1 was hidden.
Rotated the AVD to landscape.
Observed how half of item 1 was still hidden.
Rotated the AVD back to portrait.
Observed how half of item 1 was still hidden.
Tested for all horiz and vert, reversed and not reversed, rtl and ltr.
:clap: Resolves
Closes #10
:star2: Description
Adds a "LayoutRequest" object that can be used to request a re-layout of the recycler. This object can be used to save the state of the recycler and reload it later.
The layout manager now properly supports adapter data updates and orientation changes. I.E it tries to maintain the state of the layout, instead of re-laying out from 0.
:bug: Testing
Added checks to all of the scrollTo unit tests to make sure the topLeftIndex and bottomRightIndex are being properly set.
Also manually tested orientation changes using the following procedure:
Tested for all horiz and vert, reversed and not reversed, rtl and ltr.
All unit tests pass.
:thought_balloon: Other info
N/A