Skip to content

Commit

Permalink
Uploaded the v2.1.2 and Adds the capability to automatically flip the…
Browse files Browse the repository at this point in the history
… view back to front side after some fixed time and updated ReadMe
  • Loading branch information
wajahatkarim3 committed Dec 7, 2018
1 parent f3796df commit ea28521
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion EasyFlipView/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ext {
siteUrl = 'https://github.com/wajahatkarim3/EasyFlipView'
gitUrl = 'https://github.com/wajahatkarim3/EasyFlipView.git'

libraryVersion = '2.1.1'
libraryVersion = '2.1.2'

developerId = 'wajahatkarim3'
developerName = 'Wajahat Karim'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class EasyFlipView extends FrameLayout {
public static final String TAG = EasyFlipView.class.getSimpleName();

public static final int DEFAULT_FLIP_DURATION = 400;
public static final int DEFAULT_AUTO_FLIP_BACK_TIME = 100;
public static final int DEFAULT_AUTO_FLIP_BACK_TIME = 1000;
private int animFlipHorizontalOutId = R.animator.animation_horizontal_flip_out;
private int animFlipHorizontalInId = R.animator.animation_horizontal_flip_in;
private int animFlipHorizontalRightOutId = R.animator.animation_horizontal_right_out;
Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Changes exist in the [releases](https://github.com/wajahatkarim3/EasyFlipView/re
Add this in your app's build.gradle file:
```groovy
dependencies {
implementation 'com.wajahatkarim3.EasyFlipView:EasyFlipView:2.1.1'
implementation 'com.wajahatkarim3.EasyFlipView:EasyFlipView:2.1.2'
}
```

Expand All @@ -35,7 +35,7 @@ Or add EasyFlipView as a new dependency inside your pom.xml
<dependency>
<groupId>com.wajahatkarim3.EasyFlipView</groupId>
<artifactId>EasyFlipView</artifactId>
<version>2.1.1</version>
<version>2.1.2</version>
<type>pom</type>
</dependency>
```
Expand All @@ -54,6 +54,8 @@ EasyFlipView In XML layouts("Vertical")
app:flipDuration="400"
app:flipType="vertical"
app:flipFrom="front"
app:autoFlipBack="true"
app:autoFlipBackTime="1000"
>

<!-- Back Layout Goes Here -->
Expand All @@ -75,6 +77,7 @@ EasyFlipView In XML layouts("Horizontal")
app:flipDuration="400"
app:flipFrom="right"
app:flipType="horizontal"
app:autoFlipBack="false"
>

<!-- Back Layout Goes Here -->
Expand Down Expand Up @@ -124,6 +127,16 @@ All customizable attributes for EasyFlipView
front</td>
<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>
</tr>
<tr>
<td>app:autoFlipBack="true"</td>
<td>false</td>
<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>
</tr>
<tr>
<td>app:autoFlipBackTime="1000"</td>
<td>1000</td>
<td>The time in milliseconds (ms), after the card will be flipped back to original front side.</td>
</tr>
</table>

In Code (Java)
Expand Down Expand Up @@ -160,6 +173,14 @@ mYourFlipView.setToHorizontalType();
boolean isVertical = mYourFlipView.isVerticalType();
mYourFlipView.setToVerticalType();

// Get/Set if the auto flip back is enabled
boolean isAutoFlipBackEnabled = mYourFlipView.isAutoFlipBack();
mYourFlipView.setAutoFlipBack(true);

// Get/Set the time in milliseconds (ms) after the view is auto flip back to original front side
int autoflipBackTimeInMilliseconds = mYourFlipView.getAutoFlipBackTime();
mYourFlipView.setAutoFlipBackTime(2000);

// Sets the animation direction from left (horizontal) and back (vertical)
easyFlipView.setFlipTypeFromLeft();

Expand Down

0 comments on commit ea28521

Please sign in to comment.