💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.
jCenter
to MavenCentral
targetSdk
to 28 Pull Request # 30
<application>
tag from AndroidManifest.xml
. Pull Request # 38 and fixing the card animation glitch issue Pull Request # 39
Adds the capability to automatically flip the view back to front side after some fixed time. You can use it from XML like this
app:autoFlipBack="true"
app:autoFlipBackTime="1000"
or from the Java like this:
// 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);
Adds setter/getter for flipType
and flipDirection
and fixes issue #35
// Sets the animation type to horizontal
easyFlipView.setToHorizontalType();
// Sets the animation type to vertical
easyFlipView.setToVerticalType();
// Returns true if the Flip Type of animation is Horizontal?
easyFlipView.isHorizontalType();
// Returns true if the Flip Type of animation is Vertical?
easyFlipView.isVerticalType();
// Sets the animation direction from left (horizontal) and back (vertical)
easyFlipView.setFlipTypeFromLeft();
// Sets the animation direction from right (horizontal) and front (vertical)
easyFlipView.setFlipTypeFromRight();
// Sets the animation direction from front (vertical) and right (horizontal)
easyFlipView.setFlipTypeFromFront();
// Sets the animation direction from back (vertical) and left (horizontal)
easyFlipView.setFlipTypeFromBack();
// Returns the flip type from direction. For horizontal, it will be either right or left and for vertical, it will be front or back.
easyFlipView.getFlipTypeFrom();
EasyFlipView.OnFlipAnimationListener
. Now it also gives the current flip view object as well.EasyFlipView.OnFlipAnimationListener
EasyFlipView.addView()
method. Thanks to iGio90