StaggeredGridView icon indicating copy to clipboard operation
StaggeredGridView copied to clipboard

Sample app is buggy : shows empty spaces and has bad scrolling

Open AndroidDeveloperLB opened this issue 11 years ago • 4 comments

I've tested the sample app, and sadly I've noticed some weird bugs, which include presenting empty cells (sometimes tall ones) and sometimes the scrolling barely scroll anything.

All that I know is that it occurs more frequently when I change the orientation frequently.

Has anyone else got those weird bugs? Is there a workaround or alternative to this library?

EDIT: it seems it is caused because the sample doesn't set the size of the items right away, but only after the images were loaded. however, it doesn't explain the empty cells issue. i've used Volley library instead of what is used in the sample, and i've used a constant height for the cells depending on their position on the array (for example, 1/5 of the screen height in case it's even, or 1/3 in case it's not).

AndroidDeveloperLB avatar Sep 01 '13 10:09 AndroidDeveloperLB

Would also like the empty cells issue to be investigated. Currently causing me grief, but that also could be because I'm switching between child view types when I switch column counts.

psyren89 avatar Sep 19 '13 02:09 psyren89

Is this the issue mentioned by @maurycyw in the ToDo?

"currently restoring position can result in the views to be slightly offset when user flings to the top. This is corrected by checking the offsets when position 0 is reached. Would like to dig deeper into the issue."

I'd like to know where to correct.

In my test, the speed while flinging back to top is so laggy compared to flinging down. If I scroll down & up several times the whole app will hang.

cyberrob-zz avatar Dec 02 '13 05:12 cyberrob-zz

@psyren89 are your empty cell image views with lazy loading images?

briangriffey avatar Dec 02 '13 14:12 briangriffey

@briangriffey Yes the lazy loading images don't always load. @cyberrob I have the same scrolling issue as you have, driving me crazy. The HashSet solution has improved performance and fixed some of the layout issues.

pjtfernandes avatar Jan 28 '14 06:01 pjtfernandes