FileDocCategorySizeDatePackage
PathMotion.javaAPI DocAndroid 5.1 API2332Thu Mar 12 22:22:10 GMT 2015android.transition

PathMotion

public abstract class PathMotion extends Object
This base class can be extended to provide motion along a Path to Transitions.

Transitions such as {@link 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 {@link #getPath(float, float, float, float)}.

This may be used in XML as an element inside a transition.

{@code
<changeBounds>
<pathMotion class="my.app.transition.MyPathMotion"/>
</changeBounds>
}

Fields Summary
Constructors Summary
public PathMotion()

public PathMotion(android.content.Context context, android.util.AttributeSet attrs)

Methods Summary
public abstract android.graphics.PathgetPath(float startX, float startY, float endX, float endY)
Provide a Path to interpolate between two points (startX, startY) and (endX, endY). This allows controlled curved motion along two dimensions.

param
startX The x coordinate of the starting point.
param
startY The y coordinate of the starting point.
param
endX The x coordinate of the ending point.
param
endY The y coordinate of the ending point.
return
A Path along which the points should be interpolated. The returned Path must start at point (startX, startY), typically using {@link android.graphics.Path#moveTo(float, float)} and end at (endX, endY).