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!
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!