SwipeFlingAdapterView not swipable anymore after 1 card swipped
Hi guys,
First, thank you for the library, it's the best one I've come across searching for a Tinder-like swipe card effect, and I have to say I'm impressed by the good work here :)
I'm setting up my own SwipeFlingAdapterView with a custom ArrayAdapter of my own, nothing special.
But the problem I have is that the SwipeFlingAdapterView stop being interactive after I successfuly swipe one card.
After I swipped the first card, I can see the 2nd card underneath, but it's like an image, it's frozen, the 2nd card won't move.
The only way I can get my SwipeFlingAdapterView to become interactive again is to go somewhere else in my app (different fragment) and come back in order for the 2nd card to be interactive as expected.
I tried several workarounds, here is my latest (unsuccessful) attempt of modifying removeFirstObjectAdapter :
public void removeFirstObjectInAdapter() {
if (swipeAdapter.getItem(0) != null){
nManager.getProfilePool().remove(0);
}
synchronized (swipeAdapter){
swipeAdapter.notifyAll();
swipeFlingAdapterView.setAdapter(swipeFlingAdapterView.getAdapter());
}
}
Any idea ? :) Thanks for your help :)
PS : I don't know if it's related to https://github.com/Diolor/Swipecards/issues/39 or not but right after initialization of my SwipeFlingAdapterView, I sometime see the library spamming the adapter with "getView" method call.
Try simplifying it.
public void removeFirstObjectInAdapter() {
yourList.remove(0);
swipeAdapter.notifyDataSetChanged();
}
Thanks for your answer ! I actually came back to a solution like you provided and hided all the complexity in a customized ArrayAdapter, and it started working :)