You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -32,11 +34,11 @@ First of all, add `Koloda` to the xml layout of your activity, so it looks like
32
34
33
35
```xml
34
36
<?xml version="1.0" encoding="utf-8"?>
35
-
<com.yalantis.library.Koloda
36
-
android:id="@+id/koloda"
37
-
android:layout_width="match_parent"
38
-
android:layout_height="match_parent"
39
-
app:koloda_card_layout="@layout/item_koloda" />
37
+
<com.yalantis.library.Koloda
38
+
android:id="@+id/koloda"
39
+
android:layout_width="match_parent"
40
+
android:layout_height="match_parent"
41
+
app:koloda_card_layout="@layout/item_koloda" />
40
42
```
41
43
42
44
Create your adapter and set it to Koloda adapter
@@ -51,33 +53,37 @@ For customization ui Koloda you can use such attributes value :
51
53
52
54
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
53
55
```xml
54
-
<com.yalantis.library.Koloda
55
-
...
56
+
<com.yalantis.library.Koloda
57
+
...
56
58
app:koloda_card_scale_diff="0.04"
57
-
.../>
59
+
...
60
+
/>
58
61
```
59
62
60
63
To control distance between cards set value to koloda_card_offsetY in dp. The default value for CardOffsetY is 16dp.
61
64
```xml
62
65
<com.yalantis.library.Koloda
63
-
...
66
+
...
64
67
app:koloda_card_offsetY="16dp"
65
-
.../>
68
+
...
69
+
/>
66
70
```
67
71
Change angle for card when swipe it you can set value to koloda_card_rotate_angle. The default value for CardRotateAngle is 30
68
72
```xml
69
-
<com.yalantis.library.Koloda
70
-
...
73
+
<com.yalantis.library.Koloda
74
+
...
71
75
app:koloda_card_rotate_angle="30"
72
-
.../>
76
+
...
77
+
/>
73
78
```
74
79
75
80
Also you can change visible cards count in desk with koloda_max_visible_cards attributes. The default value for CardsVisible is 3
76
81
```xml
77
-
<com.yalantis.library.Koloda
78
-
...
82
+
<com.yalantis.library.Koloda
83
+
...
79
84
app:koloda_max_visible_cards="3"
80
-
.../>
85
+
...
86
+
/>
81
87
```
82
88
83
89
Kolod has reloadPreviousCard() method which reload previous card
@@ -97,17 +103,18 @@ koloda.onButtonClick(true) - swipe to right
97
103
```
98
104
99
105
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:
0 commit comments