Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.36 KB

README.md

File metadata and controls

46 lines (28 loc) · 1.36 KB

SwipeView

SwipeView for android to like or dislike the items. A Tinder-like Android library to create the swipeable cards.

Overview

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.

Usage

Create a instance:

SwipeView mSwipeView=new SwipeView(Context, LikeViewId, NopeViewId, SwipeView.OnCardSwipedListener);

Add a card to the SwipeView:

mSwipeView.addCard(View, Position);

Events

There are three events will be called with OnCardSwipedListener:

  1. onLikes() - Called when a card has been liked.

  2. onDisLikes() - Called when a card has been disliked.

  3. onSingleTap() - Called when a card has been single taped.

Important:

  1. Make sure to add the android:hardwareAccelerated="true" to your activity in manifest file.
  2. 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.

Basic Samples

Cards View

Like A Card

Dislike A Card