public class UnfoldAnimation extends Animation
DIRECTION_DOWN, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DURATION_DEFAULT, DURATION_LONG, DURATION_SHORT
Constructor and Description |
---|
UnfoldAnimation(View view)
This animation folds in the view for a customizable number of folds,
orientation and at a customizable anchor factor.
|
Modifier and Type | Method and Description |
---|---|
void |
animate()
This method animates the properties of the view specific to the Animation
object.
|
float |
getAnchorFactor()
The available anchor factors range from 0 to 1.
|
long |
getDuration() |
TimeInterpolator |
getInterpolator() |
AnimationListener |
getListener() |
int |
getNumOfFolds() |
FoldLayout.Orientation |
getOrientation()
The available orientations are
Orientation.HORIZONTAL and
Orientation.VERTICAL . |
UnfoldAnimation |
setAnchorFactor(float anchorFactor)
The available anchor factors range from 0 to 1.
|
UnfoldAnimation |
setDuration(long duration) |
UnfoldAnimation |
setInterpolator(TimeInterpolator interpolator) |
UnfoldAnimation |
setListener(AnimationListener listener) |
UnfoldAnimation |
setNumOfFolds(int numOfFolds) |
UnfoldAnimation |
setOrientation(FoldLayout.Orientation orientation)
The available orientations are
Orientation.HORIZONTAL and
Orientation.VERTICAL . |
public UnfoldAnimation(View view)
view
- The view to be animated.public void animate()
Animation
public int getNumOfFolds()
public UnfoldAnimation setNumOfFolds(int numOfFolds)
numOfFolds
- The number of folds to set.public FoldLayout.Orientation getOrientation()
Orientation.HORIZONTAL
and
Orientation.VERTICAL
.public UnfoldAnimation setOrientation(FoldLayout.Orientation orientation)
Orientation.HORIZONTAL
and
Orientation.VERTICAL
.orientation
- The orientation of the fold to set.public float getAnchorFactor()
public UnfoldAnimation setAnchorFactor(float anchorFactor)
anchorFactor
- The anchor factor of the fold to set.public TimeInterpolator getInterpolator()
public UnfoldAnimation setInterpolator(TimeInterpolator interpolator)
interpolator
- The interpolator of the entire animation to set.public long getDuration()
public UnfoldAnimation setDuration(long duration)
duration
- The duration of the entire animation to set.public AnimationListener getListener()
public UnfoldAnimation setListener(AnimationListener listener)
listener
- The listener to set for the end of the animation.