Skip to content

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

Description

@CigoZim

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions