public class PathAnimation extends Animation implements Combinable
Modifier and Type | Field and Description |
---|---|
static int |
ANCHOR_BOTTOM_LEFT |
static int |
ANCHOR_BOTTOM_RIGHT |
static int |
ANCHOR_CENTER |
static int |
ANCHOR_TOP_LEFT |
static int |
ANCHOR_TOP_RIGHT |
DIRECTION_DOWN, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DURATION_DEFAULT, DURATION_LONG, DURATION_SHORT
Constructor and Description |
---|
PathAnimation(View view)
This animation translates the view within its parent view and according
to the ArrayList
|
Modifier and Type | Method and Description |
---|---|
void |
animate()
This method animates the properties of the view specific to the Animation
object.
|
int |
getAnchorPoint()
The available anchor points at which to translate the view are
ANCHOR_CENTER , ANCHOR_TOP_LEFT ,
ANCHOR_TOP_RIGHT , ANCHOR_BOTTOM_LEFT and
ANCHOR_BOTTOM_RIGHT . |
AnimatorSet |
getAnimatorSet() |
long |
getDuration() |
TimeInterpolator |
getInterpolator() |
AnimationListener |
getListener() |
java.util.ArrayList<Point> |
getPoints() |
PathAnimation |
setAnchorPoint(int anchorPoint)
The available anchor points at which to translate the view are
ANCHOR_CENTER , ANCHOR_TOP_LEFT ,
ANCHOR_TOP_RIGHT , ANCHOR_BOTTOM_LEFT and
ANCHOR_BOTTOM_RIGHT . |
PathAnimation |
setDuration(long duration) |
PathAnimation |
setInterpolator(TimeInterpolator interpolator) |
PathAnimation |
setListener(AnimationListener listener) |
PathAnimation |
setPoints(java.util.ArrayList<Point> points) |
public static final int ANCHOR_CENTER
public static final int ANCHOR_TOP_LEFT
public static final int ANCHOR_TOP_RIGHT
public static final int ANCHOR_BOTTOM_LEFT
public static final int ANCHOR_BOTTOM_RIGHT
public PathAnimation(View view)
view
- The view to be animated.public void animate()
Animation
animate
in interface Combinable
animate
in class Animation
public AnimatorSet getAnimatorSet()
getAnimatorSet
in interface Combinable
public java.util.ArrayList<Point> getPoints()
ArrayList
public PathAnimation setPoints(java.util.ArrayList<Point> points)
points
- The ArrayListArrayList
public int getAnchorPoint()
ANCHOR_CENTER
, ANCHOR_TOP_LEFT
,
ANCHOR_TOP_RIGHT
, ANCHOR_BOTTOM_LEFT
and
ANCHOR_BOTTOM_RIGHT
.public PathAnimation setAnchorPoint(int anchorPoint)
ANCHOR_CENTER
, ANCHOR_TOP_LEFT
,
ANCHOR_TOP_RIGHT
, ANCHOR_BOTTOM_LEFT
and
ANCHOR_BOTTOM_RIGHT
.anchorPoint
- The anchor point to set at which to translate the view.public TimeInterpolator getInterpolator()
public PathAnimation setInterpolator(TimeInterpolator interpolator)
setInterpolator
in interface Combinable
interpolator
- The interpolator of the entire animation to set.public long getDuration()
getDuration
in interface Combinable
public PathAnimation setDuration(long duration)
setDuration
in interface Combinable
duration
- The duration of the entire animation to set.public AnimationListener getListener()
public PathAnimation setListener(AnimationListener listener)
setListener
in interface Combinable
listener
- The listener to set for the end of the animation.