public abstract class PathMotion
extends java.lang.Object
Transitions such as android.transition.ChangeBounds move Views, typically
in a straight path between the start and end positions. Applications that desire to
have these motions move in a curve can change how Views interpolate in two dimensions
by extending PathMotion and implementing getPath(float, float, float, float).
This may be used in XML as an element inside a transition.
<changeBounds>
<pathMotion class="my.app.transition.MyPathMotion"/>
</changeBounds>
| Modifier and Type | Field and Description |
|---|---|
static PathMotion |
STRAIGHT_PATH_MOTION |
| Constructor and Description |
|---|
PathMotion() |
PathMotion(android.content.Context context,
android.util.AttributeSet attrs) |
| Modifier and Type | Method and Description |
|---|---|
abstract android.graphics.Path |
getPath(float startX,
float startY,
float endX,
float endY)
Provide a Path to interpolate between two points
(startX, startY) and
(endX, endY). |
public static final PathMotion STRAIGHT_PATH_MOTION
public PathMotion()
public PathMotion(android.content.Context context,
android.util.AttributeSet attrs)
public abstract android.graphics.Path getPath(float startX,
float startY,
float endX,
float endY)
(startX, startY) and
(endX, endY). This allows controlled curved motion along two dimensions.startX - The x coordinate of the starting point.startY - The y coordinate of the starting point.endX - The x coordinate of the ending point.endY - The y coordinate of the ending point.(startX, startY), typically using
Path.moveTo(float, float) and end at (endX, endY).