I wanted to keep track of the expanded item position.
Using the default expansion listener didn't work.
So I had to write my own onClickListener which was not possible because you set it by default in the header class.
I had to create my custom header to remove the clickListener and add my own clicklistener in the recyclerview adapter.
Can you also please make it that when calling .expand() or .collapse() with false as the parameter to reset the indicator without animation too.
I also was looking for a way to set a custom click handler on the header. I ended up setting it in .doOnAttach because the default is set in onAttach and mine would be set after.
I wanted to keep track of the expanded item position. Using the default expansion listener didn't work. So I had to write my own onClickListener which was not possible because you set it by default in the header class. I had to create my custom header to remove the clickListener and add my own clicklistener in the recyclerview adapter. Can you also please make it that when calling .expand() or .collapse() with false as the parameter to reset the indicator without animation too.