maurycyw / StaggeredGridView

A modified version of Android's experimental StaggeredGridView. Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.
https://github.com/maurycyw/StaggeredGridViewDemo
1.64k stars 664 forks source link

solved NPE in layoutChildren() when removing child Views #69

Closed accounts01 closed 2 years ago

accounts01 commented 10 years ago

StaggeredGridView.layoutChildren() can trigger an NPE when it removes child Views because it iterates on the original number of child Views.

Solved this by adjusting the looping condition and the increment (so we don't skip over new ith element).

accounts01 commented 10 years ago

also looks like all 3 commits ended up in 1 pull request. :'(. let me know if this is a problem and/or how to fix it please.