File tree Expand file tree Collapse file tree 1 file changed +60
-1
lines changed Expand file tree Collapse file tree 1 file changed +60
-1
lines changed Original file line number Diff line number Diff line change 1
- # deck
1
+ # Deck
2
+
3
+ ![ alt_tag] ( https://bloximages.chicago2.vip.townnews.com/journaltimes.com/content/tncms/assets/v3/editorial/4/48/4484cfa4-e685-5fb8-9b05-3d3df399ac06/57838be8937b3.image.jpg )
4
+
5
+ # What is it?
6
+
7
+ Deck is a library that permits you to apply a beautiful animation in your view pager, and this animations looks like a deck... yeah, I'm not good with names.
8
+
9
+ ![ alt_tag] ( https://media.giphy.com/media/l4EpiKjC1H2sQCVva/giphy.gif )
10
+
11
+ # How does it works?
12
+
13
+ First of all you need to declare it in your layout xml file
14
+
15
+ ``` xml
16
+ <com .example.lib.Deck
17
+ android : id =" @+id/deck_pager"
18
+ android : layout_width =" match_parent"
19
+ android : layout_height =" match_parent" />
20
+ ```
21
+
22
+ then you just need to set deck default padding
23
+
24
+ ``` kotlin
25
+ private val deckPager by lazy { activity.findViewById<Deck >(R .id.deck_pager) }
26
+
27
+ private fun initDeck () {
28
+ deckPager.useDefaultPadding(activity)
29
+ }
30
+
31
+ ```
32
+
33
+ ##### Remember you can set all other view pager properties with deck
34
+
35
+ # Import
36
+
37
+ It's easy import deck in your project, first you need add jit pack maven reference in your project
38
+
39
+ ``` groovy
40
+ repositories {
41
+ maven { url 'https://jitpack.io' }
42
+ }
43
+ ```
44
+
45
+ then add deck referente in your gradle dependencies
46
+
47
+ ##### Gradle
48
+
49
+ ``` groovy
50
+ dependencies {
51
+ compile 'com.github.bloderxd:deck:0.1'
52
+ }
53
+ ```
54
+
55
+ ##### Gradle v3.0+
56
+ ``` groovy
57
+ dependencies {
58
+ implementation 'com.github.bloderxd:deck:0.1'
59
+ }
60
+ ```
You can’t perform that action at this time.
0 commit comments