aaronbond / Swipe-Deck

A Tinder style Swipeable deck view for Android
MIT License
797 stars 158 forks source link

Cannot swipe the second to last card. #40

Closed qteen1 closed 8 years ago

qteen1 commented 8 years ago

Hey man,

First I would like to compliment you on how you strucuted the code really well. But I seem to find the issue to your bug.

I swipe through all the cards fine, but when I get to the second to last card. I cannot swipe it.

In order for me to swipe the second to last card, I have to press the "add cards" button. To add more cards. Then I can swipe cards again UNTIL (again) I reach the second to last card.

So no matter what, I cannot swipe the second to last card. How can I fix this error and where in the code is the problem located?

Cheers~

pranayairan commented 8 years ago

I am seeing that issue as well, i can not swipe the second last card.

njt28 commented 8 years ago

Hi guys, @qteen1 @pranayairan do you have any solutions?

aaronbond commented 8 years ago

please try using https://github.com/aaronbond/SwipeDeck2

qteen1 commented 8 years ago

Thanks Aaron. I will try this out soon and get back to you with updates!

jituiitm commented 8 years ago

final View child = getChildAt(getChildCount() - childOffset);

replace with

final View child = getChildAt(0);