etsy / AndroidStaggeredGrid

An Android staggered grid view which supports multiple columns with rows of varying sizes.
https://github.com/etsy/AndroidStaggeredGrid
4.76k stars 1.13k forks source link

resetToTop() not invalidate child view #113

Open rey5137 opened 10 years ago

rey5137 commented 10 years ago

If you scroll grid view so the first visible position large than 0, and call resetToTop(), although grid view go back to top, child views still not invalidate and show the old data.

A quick fix to add mDataChanged = true; in setSelection(int) of ExtendableListView class:

@Override
public void setSelection(final int position) {
    if (position >= 0) {
        mLayoutMode = LAYOUT_SYNC;
        mSpecificTop = getListPaddingTop();
        mDataChanged = true;

        ...
    }
}
xifan-xf commented 9 years ago

have same issue.thanks for this quick fix.