Occurs on master commit b81c1c6
Video can be found here: http://dai.ly/x1dj5iy
Test App to reproduce is at https://github.com/venkat230278/AndroidStaggeredGridViewOverscrollBug.git
Place app at same level as "library", "sample", import into Android studio and build.
Test App has a StaggeredGridView with 2 columns. Its adapter supplies 3 text views. Eventually, the three text views are laid out by the GridView as below.
A B
C
All text views (A, B, C) are of equal height H. H is greater than screen height. In above layout, A and B are clipped by the screen.
Slowly start scrolling towards and beyond C. Note that it is possible to scroll beyond C. Scroll in reverse towards A. Notice that B has disappeared. Notice after a while that A too disappears.
This issue is also encountered if the user flings on A or B towards C.
It appears that the grid view considers empty columns in scroll math. We tried to put in a quick hack fix for this issue for our product.
Patch can be found here: https://github.com/venkat230278/AndroidStaggeredGridViewOverscrollBug/blob/master/patch/sg.patch
Apply patch as follows:
[Some dir]/AndroidStaggeredGrid/library/src/main$ patch -p1 < sg.patch
Things to note about the above patch:
- Tested only for 2 columns.
- Not tested with other staggered grid features such as headers or footers.
- Might introduce other bugs.
- No guarantee / warranty of any kind. Use at your own risk.
- Might make the staggered grid less efficient.
Occurs on master commit b81c1c6
Video can be found here: http://dai.ly/x1dj5iy
Test App to reproduce is at https://github.com/venkat230278/AndroidStaggeredGridViewOverscrollBug.git
Place app at same level as "library", "sample", import into Android studio and build.
Test App has a StaggeredGridView with 2 columns. Its adapter supplies 3 text views. Eventually, the three text views are laid out by the GridView as below.
A B
C
All text views (A, B, C) are of equal height H. H is greater than screen height. In above layout, A and B are clipped by the screen.
Slowly start scrolling towards and beyond C. Note that it is possible to scroll beyond C. Scroll in reverse towards A. Notice that B has disappeared. Notice after a while that A too disappears.
This issue is also encountered if the user flings on A or B towards C.
It appears that the grid view considers empty columns in scroll math. We tried to put in a quick hack fix for this issue for our product.
Patch can be found here: https://github.com/venkat230278/AndroidStaggeredGridViewOverscrollBug/blob/master/patch/sg.patch
Apply patch as follows:
[Some dir]/AndroidStaggeredGrid/library/src/main$ patch -p1 < sg.patch
Things to note about the above patch: