public class FoldAnimation extends Animation
View.INVISIBLE
.DIRECTION_DOWN, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DURATION_DEFAULT, DURATION_LONG, DURATION_SHORT
Constructor and Description |
---|
FoldAnimation(View view)
This animation folds out 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 . |
FoldAnimation |
setAnchorFactor(float anchorFactor)
The available anchor factors range from 0 to 1.
|
FoldAnimation |
setDuration(long duration) |
FoldAnimation |
setInterpolator(TimeInterpolator interpolator) |
FoldAnimation |
setListener(AnimationListener listener) |
FoldAnimation |
setNumOfFolds(int numOfFolds) |
FoldAnimation |
setOrientation(FoldLayout.Orientation orientation)
The available orientations are
Orientation.HORIZONTAL and
Orientation.VERTICAL . |
public FoldAnimation(View view)
View.INVISIBLE
.view
- The view to be animated.public void animate()
Animation
public int getNumOfFolds()
public FoldAnimation setNumOfFolds(int numOfFolds)
numOfFolds
- The number of folds to set.public FoldLayout.Orientation getOrientation()
Orientation.HORIZONTAL
and
Orientation.VERTICAL
.public FoldAnimation setOrientation(FoldLayout.Orientation orientation)
Orientation.HORIZONTAL
and
Orientation.VERTICAL
.orientation
- The orientation of the fold to set.public float getAnchorFactor()
public FoldAnimation setAnchorFactor(float anchorFactor)
anchorFactor
- The anchor factor of the fold to set.public TimeInterpolator getInterpolator()
public FoldAnimation setInterpolator(TimeInterpolator interpolator)
interpolator
- The interpolator of the entire animation to set.public long getDuration()
public FoldAnimation setDuration(long duration)
duration
- The duration of the entire animation to set.public AnimationListener getListener()
public FoldAnimation setListener(AnimationListener listener)
listener
- The listener to set for the end of the animation.