I used this widget library of Android-SwipeListView
. And I forked this library on Github
. And I had a solution about this problem of this library. Here is my project which I had fixed this bug, check it out, and take a deep look at it.
I modified the implementation of closeAnimate
. It was at line 349. The closeAnimate(int)
after modification is like this:
protected void closeAnimate(int position) {
View view = swipeListView.getChildAt(position - swipeListView.getFirstVisiblePosition());
if (view != null) {
closeAnimate(view.findViewById(swipeFrontView), position);
}
}
Then, crashes don't happen again during fast scrolling vertically.
Meanwhile, he same question happens at openAnimate(int)
, and the openAnimate(int)
modified is like this:
protected void openAnimate(int position) {
final View child = swipeListView.getChildAt(position - swipeListView.getFirstVisiblePosition()).findViewById(swipeFrontView);
if (child != null) {
openAnimate(child, position);
}
}