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

Fixed setAdapter bug #85

Merged
merged 1 commit into from
Apr 6, 2014
Merged

Fixed setAdapter bug #85

merged 1 commit into from
Apr 6, 2014

Conversation

lzanita09
Copy link
Contributor

adapter should be mAdapter, otherwise when adding header view, mItemCount will get the original adapter's getCount(), which doesn't count the number of headers and/or footers. Later on in layoutChildren() method it'll throw IllegalStateException, because the number of mItemCount and mAdapter.getCount() will never be equal.

adapter should be mAdapter, otherwise when adding header view, mItemCount will get the original adapter's getCount(), which doesn't count the number of headers and/or footers. Later on in layoutChildren() method it'll throw IllegalStateException, because the number of mItemCount and mAdapter.getCount() will never be equal.
@denizmveli
Copy link
Contributor

Good find. The immediately following code that sets the dataset observer and the view type count on the recycle bin is also wrong. I'll fix this up.

Thanks :)

denizmveli added a commit that referenced this pull request Apr 6, 2014
Merged pull request #86 - Fixed setAdapter bug
@denizmveli denizmveli merged commit 18e9ae8 into etsy:master Apr 6, 2014
@lzanita09
Copy link
Contributor Author

Thank you! A really nice library, I wish I found it earlier...

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

Successfully merging this pull request may close these issues.

2 participants