Your guess seems correct, probably this line:
swipeAdapter.setListView(listView.getWrappedList())
You have an error on line 419 in SwipeActionTouchListener, because there is no search group (down):
L419 mDownViewGroup.showBackground...
mDownViewGroup is a child view initialized with a down action:
... child = mListView.getChildAt(i); child.getHitRect(rect); if (rect.contains(x, y)) { try { mDownViewGroup = (SwipeViewGroup) child; ...
I do not know the structure lying in the listview.getWrappedList () list that you provide, but I assume that for swipeaction this is not like that. If you don’t like this, probably due to the fact that the package removes the child structure (int childCount = mListView.getChildCount (); <- you get childcount = 0, mDownViewGroup is not initialized). Try to understand why a wrapped list removes a child structure, and you are likely to get what happens.
Edit: Searched a little more, it seems that this is not a fact that it does not receive children, but because it does not receive a swipeviewgroup:
java.lang.ClassCastException: se.emilsjolander.stickylistheaders.WrapperView cannot be cast to com.wdullaer.swipeactionadapter.SwipeViewGroup
I managed to get it to work by marking up and creating a WrapperView extends SwipeViewGroup (instead of ViewGroup). Some sensory performer also had to be protected, but there wasn’t much work. But that’s all it takes.
A working example is available here: https://github.com/he667/StickyListSwipe
source share