Open l2dev opened 6 years ago
Its not working as expected by the changes you placed above.
And is the animation arrow working when you are using just a library 'com.thoughtbot:expandablerecyclerview:1.3' ?
Yes, animation is working but arrow issue is still there.
Is there any prevention for arrow management.
Going only with Point 4 fixes the arrow issue for me :)
@eurbon : How to change Library? Its class are only readable.
So basically if you remove expandablerecyclerviewcheck project and in your sample project you try to rely on project expandablerecyclerview like this compile project(':expandablerecyclerview') then you will have a bad time. When expanding the groups, arrows are just rotating 360 degrees and events are messed up.
I digged deeper and saw that expandablerecyclerview project is relying on expandablerecyclerviewcheck project which in the gradle has a dependency on the repo compile 'com.thoughtbot:expandablerecyclerview:1.3'
After lots of trial and error I've concluded that the repo 'com.thoughtbot:expandablerecyclerview:1.3' has this issue fixed, while in provided source it's not fixed.
So here's what you need to do to fix this:
com/thoughtbot/expandablerecyclerview/ExpandCollapseController.java
Change:
boolean expanded = expandableList.expandedGroupIndexes[listPos.groupPos];
to:
boolean expanded = isGroupExpanded(listPos.groupPos);
com/thoughtbot/expandablerecyclerview/ExpandableRecyclerViewAdapter.java
Delete this block
Delete this block in onGroupExpanded Method
Delete this block in OnGroupCollapsed Metod
com/thoughtbot/expandablerecyclerview/MultiTypeExpandableRecyclerViewAdapter.java
Delete block
com/thoughtbot/expandablerecyclerview/viewholders/GroupViewHolder.java
Replace this line:
listener.onGroupClick(getAdapterPosition());
With block: