SwipeView for android to like or dislike the items. A Tinder-like Android library to create the swipeable cards.
SwipeView is a view that can be used to like/dislike a card from the list of cards placed one behind one.
A card can be liked/disliked by swiping the card or pressing the like and nope buttons.
Create a instance:
SwipeView mSwipeView=new SwipeView(Context, LikeViewId, NopeViewId, SwipeView.OnCardSwipedListener);
Add a card to the SwipeView:
mSwipeView.addCard(View, Position);
There are three events will be called with OnCardSwipedListener:
-
onLikes() - Called when a card has been liked.
-
onDisLikes() - Called when a card has been disliked.
-
onSingleTap() - Called when a card has been single taped.
- Make sure to add the android:hardwareAccelerated="true" to your activity in manifest file.
- For the better cards view, the SwipeView can holds the maximum of 3 cards at a time. But, you can add one by one after a card has been removed.