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

When XRecyclerView instance num > 1 in an Activity, First instance addHeaderView() num < Second instance, then App crashed! #2

Open
CigoZim opened this issue Jul 31, 2016 · 0 comments

Comments

@CigoZim
Copy link

CigoZim commented Jul 31, 2016

When XRecyclerView instance num > 1 in an Activity, like this:
eg:
Two Fragment in one Activity:the First fragment has an XRecyclerView with do addHeaderView() one times, and the Second fragment has an XRecyclerView with do addHeaderView() two times, then App crashed!

So, I checked the class XRecyclerView, found that:
private static List<Integer> sHeaderTypes = new ArrayList<>();
So I remove the flag static, like this:
private List<Integer> sHeaderTypes = new ArrayList<>();

OK, well done, problem solved!

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