Closed Godsmack121Kcamsdog closed 3 years ago
adapter
.setAutoCollapseOnExpand(true)
.setAutoScrollOnExpand(true)
.setMinCollapsibleLevel(0)
.setStickyHeaders(true)
.setAnimateToLimit(Integer.MAX_VALUE) //Size limit = MAX_VALUE will always animate the changes
.setNotifyMoveOfFilteredItems(true) //When true, filtering on big list is very slow!
.setAnimationOnForwardScrolling(true)
.setAnimationOnReverseScrolling(true);
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setLayoutManager(new SmoothScrollLinearLayoutManager(this));
recyclerView.setHasFixedSize(true);
recyclerView.setAdapter(adapter);
What should I do if I need all expandable items to be collapsed at start?
Currently I have Items AbstractExpandableHeaderItem and AbstractSectionableItem I`ve made pet project and inicialize items like this:
If I dont call expandItemsAtStartUp() - then it doesnt work correct. I have 100 headers, each with 5 subitems. If I click Header1, for example - then at place of Header2 appears Header6 and Header1 does not expand. If I call expandItemsAtStartUp() and then call collapseAll() - nothing happens.