From b2c553eb06305cbec9e272dc5b760df96968153a Mon Sep 17 00:00:00 2001 From: Dipansh Khandelwal Date: Fri, 23 Mar 2018 23:43:46 +0530 Subject: [PATCH] Update README.md --- README.md | 79 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 23af3e7..9d29a31 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Koloda-Android - - - +

+ + + +

## Requirements - Android SDK 15+ @@ -12,18 +14,18 @@ Add to your root build.gradle: ```Groovy allprojects { - repositories { - ... - maven { url 'https://jitpack.io' } - } + repositories { + ... + maven { url 'https://jitpack.io' } } +} ``` Add the dependency: ```Groovy dependencies { - compile 'com.github.Yalantis:Koloda-Android:v0.0.1-alpha' - } + compile 'com.github.Yalantis:Koloda-Android:v0.0.1-alpha' +} ``` ## How to use this library in your project? @@ -32,11 +34,11 @@ First of all, add `Koloda` to the xml layout of your activity, so it looks like ```xml - + ``` Create your adapter and set it to Koloda adapter @@ -51,33 +53,37 @@ For customization ui Koloda you can use such attributes value : To control the card position by scale lower cards set koloda_card_scale_diff attributes float value in layout. The range of ScaleDiff is 0.01 - 0.1. The default value for ScaleDiff is 0.04f ```xml - + ... +/> ``` To control distance between cards set value to koloda_card_offsetY in dp. The default value for CardOffsetY is 16dp. ```xml + ... +/> ``` Change angle for card when swipe it you can set value to koloda_card_rotate_angle. The default value for CardRotateAngle is 30 ```xml - + ... +/> ``` Also you can change visible cards count in desk with koloda_max_visible_cards attributes. The default value for CardsVisible is 3 ```xml - + ... +/> ``` Kolod has reloadPreviousCard() method which reload previous card @@ -97,17 +103,18 @@ koloda.onButtonClick(true) - swipe to right ``` Also you can create `KolodaListener` and use all the methods of the `KolodaListener`. This interface provides empty implementations of the methods. For any custom animation callback handle you can create any custom listener that cares only about a subset of the methods of this listener can simply implement the interface directly: -
onNewTopCard(position: Int)
-onCardDrag(position: Int, cardView: View, progress: Float)
-onCardSwipedLeft(position: Int)
-onCardSwipedRight(position: Int)
-onClickRight(position: Int)
-onClickLeft(position: Int)
-onCardSingleTap(position: Int)
-onCardDoubleTap(position: Int)
-onCardLongPress(position: Int)
-onEmptyDeck()
- +``` +onNewTopCard(position: Int) +onCardDrag(position: Int, cardView: View, progress: Float) +onCardSwipedLeft(position: Int) +onCardSwipedRight(position: Int) +onClickRight(position: Int) +onClickLeft(position: Int) +onCardSingleTap(position: Int) +onCardDoubleTap(position: Int) +onCardLongPress(position: Int) +onEmptyDeck() +``` ## Let us know!