Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staggered listview were broken when I reinstantiate. #185

Open
kyungin-park opened this issue Jun 2, 2015 · 0 comments
Open

Staggered listview were broken when I reinstantiate. #185

kyungin-park opened this issue Jun 2, 2015 · 0 comments

Comments

@kyungin-park
Copy link

When I called resetToTop of StaggeredGridView, listview positions were broken.
I finally found what is the cause of the problem and I am sharing with you guys to prevent having the same problem.

On ExpendableListView.java file,

private void clearState() {
    ....
    mDataChanged = true; <----- Here should be true...
    .....
}


public void resetToTop() {
    // I added the reinitiation below.
    clearState();
    invokeOnItemScrollListener();
}

On StaggeredGridView.java file,

@Override
public void resetToTop() {
    // I added the super call below.
    super.resetToTop();
    ....
}

I found some critical bugs which are not found by others.
It's little bit strange... why only to me....
It seems that the reason why I have lots of exceptions unlike that other people don't have is that my loading speed is little more delayed than usual usages.
That makes some differences to draw and calculate the staggered listview.
Um... And I don't know if my corrections are perfectly correct or not, but it works in my logic at least...
And I discovered one more bug staggered position became to the same bottom when I scroll it fast.
I will look into the reason someday because I am busy with working... T_T
If anyone found these bugs I found, please update it. please solve it together to make it better~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant