public abstract class PathMotion extends Object
Transitions such as 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>
Constructor and Description |
---|
PathMotion() |
PathMotion(Context context,
AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
abstract Path |
getPath(float startX,
float startY,
float endX,
float endY)
Provide a Path to interpolate between two points
(startX, startY) and
(endX, endY) . |
public PathMotion()
public PathMotion(Context context, AttributeSet attrs)
public abstract 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)
.