kikoso / Swipeable-Cards

A native library providing a Tinder-like cards effect. A card can be constructed using an image and displayed with animation effects, dismiss-to-like and dismiss-to-unlike, and use different sorting mechanisms.
Apache License 2.0
1.48k stars 364 forks source link

1st CardModel item is always the same. #20

Closed dannyroa closed 9 years ago

dannyroa commented 10 years ago

I always get the same CardModel hence the same card always get the Click event. (https://github.com/kikoso/Swipeable-Cards/blob/master/AndTinder/src/main/java/com/andtinder/view/CardContainer.java#L449).

The card is being removed from the container (https://github.com/kikoso/Swipeable-Cards/blob/master/AndTinder/src/main/java/com/andtinder/view/CardContainer.java#L472) but it seems that it is not being removed from the CardStackAdapter because the "pop" method is not being called anywhere.

Am I missing something?

arjs1000 commented 10 years ago

No I believe you are correct, I am experiencing the same bug. Perhaps this was introduced in a recent update.

I'll look into it and comment if I find anything.

arjs1000 commented 10 years ago

Make sure your implementation of CardContainer has the onLike() and onDislike() methods which correctly push and pop onto the CardAdapter. I managed to fix this bug by modifying my code in this way.

hackathoner commented 9 years ago

@arjs1000 do you think you could make a gist showing us how to fix the issue for onclicklistener?

arjs1000 commented 9 years ago

@hackathoner I ended up migrating to the following library instead: https://github.com/Diolor/Swipecards/

This library seems more stable and maintainable. Feel free to check out my implementation of this here: https://play.google.com/store/apps/details?id=com.paywithvelocity.velocity

However, if you wish to still use this library. I managed to fix some of the problems by ensuring the parent card adapter class was correctly overriding its methods.

davidm06 commented 9 years ago

dears any update ?

kikoso commented 9 years ago

This issue is solved with the latest update.

monishagarwal215 commented 9 years ago

Kikoso i found that no where you are calling pop method, nor the adapter is empty it remains of same size.