expandable-recycler-view
expandable-recycler-view copied to clipboard
the parent onclicklistener not match the position
when I click the first parent item, the list show me the second children item, and all the items have the same problem, when i chick the last item, java.lang.IndexOutOfBoundsException, what's the problem?
Hi @bsty2015, is your data set changing and you haven't yet notified the adapter of the change? sounds like one item is being removed from the ArrayList of parent items, but without notifying the adapter click listener events may be off as well as crashes when accessing a list that has become smaller.
Let me know, otherwise I'll need a little bit more information (or maybe you can recreate the problem with the samples provided)
I have to same problem too. I even set 2 function after I remove one 1 item from my array: adapter.notifyParentItemRemoved(position); adapter.notifyDataSetChanged();
they problem happend like when I have a list with 6 item, I expanded position num 2, and I remove 4 still good, but remove another like position 5 then it happend. that situation show me that include the number of children from parent position 2.
@zajnbovv any chance you have sample code that recreates the problem?
yes, please tell me how can I show you my sample please?
Any update on this issue, I have got the same problem
Sorry I missed the reply to this in January, would love a sample to recreate the problem. The sample can be given through Github using a public repository. Reopening for now.
Any update on this issue, I have got the same problem?
@alcntml Do you have a sample to recreate the problem I can look at?
Hi: I have the same problem,When I use the XRecyclerView(https://github.com/jianghejie/XRecyclerView). I click the first parent item, the list show me the second children item.I think maybe is a header problem.hope your response
Hi @Paul-turner I have some problem, Actually i have created a ExpandableRecyclerView with GridLayoutManager with 2 span count, so when i click on the Parent-view the the child view is expanding just next to parent-view but i want to expand it vertically. suppose two colmun is there then when clicked to the 1st column then its is expanding next to it but when cloumn 2nd item is clicked then there is no space so its is expanding below of it means on the 1st column side. but i want to expand each parent vertically. i am using the library 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1' please help