@@ -25,7 +25,7 @@ Changes exist in the [releases](https://github.com/wajahatkarim3/EasyFlipView/re
25
25
Add this in your app's build.gradle file:
26
26
``` groovy
27
27
dependencies {
28
- implementation 'com.wajahatkarim3.EasyFlipView:EasyFlipView:2.1.1 '
28
+ implementation 'com.wajahatkarim3.EasyFlipView:EasyFlipView:2.1.2 '
29
29
}
30
30
```
31
31
@@ -35,7 +35,7 @@ Or add EasyFlipView as a new dependency inside your pom.xml
35
35
<dependency >
36
36
<groupId >com.wajahatkarim3.EasyFlipView</groupId >
37
37
<artifactId >EasyFlipView</artifactId >
38
- <version >2.1.1 </version >
38
+ <version >2.1.2 </version >
39
39
<type >pom</type >
40
40
</dependency >
41
41
```
@@ -54,6 +54,8 @@ EasyFlipView In XML layouts("Vertical")
54
54
app:flipDuration=" 400"
55
55
app:flipType=" vertical"
56
56
app:flipFrom=" front"
57
+ app:autoFlipBack=" true"
58
+ app:autoFlipBackTime=" 1000"
57
59
>
58
60
59
61
<!-- Back Layout Goes Here -->
@@ -75,6 +77,7 @@ EasyFlipView In XML layouts("Horizontal")
75
77
app:flipDuration=" 400"
76
78
app:flipFrom=" right"
77
79
app:flipType=" horizontal"
80
+ app:autoFlipBack=" false"
78
81
>
79
82
80
83
<!-- Back Layout Goes Here -->
@@ -124,6 +127,16 @@ All customizable attributes for EasyFlipView
124
127
front</td>
125
128
<td>Whether card should flip from left to right Or right to left(Horizontal type) or car should flip to front or back(Vertical type)</td>
126
129
</tr>
130
+ <tr>
131
+ <td>app:autoFlipBack="true"</td>
132
+ <td>false</td>
133
+ <td>If this is set to true, then he card will be flipped back to original front side after the time set in <i>autoFlipBackTime</i>.</td>
134
+ </tr>
135
+ <tr>
136
+ <td>app:autoFlipBackTime="1000"</td>
137
+ <td>1000</td>
138
+ <td>The time in milliseconds (ms), after the card will be flipped back to original front side.</td>
139
+ </tr>
127
140
</table>
128
141
129
142
In Code (Java)
@@ -160,6 +173,14 @@ mYourFlipView.setToHorizontalType();
160
173
boolean isVertical = mYourFlipView. isVerticalType();
161
174
mYourFlipView. setToVerticalType();
162
175
176
+ // Get/Set if the auto flip back is enabled
177
+ boolean isAutoFlipBackEnabled = mYourFlipView. isAutoFlipBack();
178
+ mYourFlipView. setAutoFlipBack(true );
179
+
180
+ // Get/Set the time in milliseconds (ms) after the view is auto flip back to original front side
181
+ int autoflipBackTimeInMilliseconds = mYourFlipView. getAutoFlipBackTime();
182
+ mYourFlipView. setAutoFlipBackTime(2000 );
183
+
163
184
// Sets the animation direction from left (horizontal) and back (vertical)
164
185
easyFlipView. setFlipTypeFromLeft();
165
186
0 commit comments