yuyakaido / CardStackView

📱Tinder like swipeable card view for Android
Apache License 2.0
2.37k stars 448 forks source link

Feature: allow swipe in specific directions only #260

Open andybdahl opened 5 years ago

andybdahl commented 5 years ago

Right now, if i use CardStackLayoutManager.setDirections(Directions.Right) and CardStackLayoutManager.setCanScrollVertical(false), the user can swipe only to one side, but the other side will still drag and animate back when the user releases the finger.

I want to be able to set CardStackLayoutManager.setCanScrollLeft(false), CardStackLayoutManager.setCanScrollRight(false), CardStackLayoutManager.setCanScrollUp(false), CardStackLayoutManager.setCanScrollDown(false). So the user can drag only to one side for example.

Would be a nice feature.

yuyakaido commented 5 years ago

@andreasmakeable Thank you for your proposal. I think this is a nice feature but I have no time to implement right now... So your contribution is always welcome!