public class PatternPathMotion extends PathMotion
This may be used in XML as an element inside a transition.
<changeBounds>
<patternPathMotion android:patternPathData="M0 0 L0 100 L100 100"/>
</changeBounds>
Constructor and Description |
---|
PatternPathMotion()
Constructs a PatternPathMotion with a straight-line pattern.
|
PatternPathMotion(Context context,
AttributeSet attrs) |
PatternPathMotion(Path patternPath)
Creates a PatternPathMotion with the Path defining a pattern of motion between two
coordinates.
|
Modifier and Type | Method and Description |
---|---|
Path |
getPath(float startX,
float startY,
float endX,
float endY)
Provide a Path to interpolate between two points
(startX, startY) and
(endX, endY) . |
Path |
getPatternPath()
Returns the Path defining a pattern of motion between two coordinates.
|
void |
setPatternPath(Path patternPath)
Sets the Path defining a pattern of motion between two coordinates.
|
public PatternPathMotion()
public PatternPathMotion(Context context, AttributeSet attrs)
public PatternPathMotion(Path patternPath)
patternPath
- A Path to be used as a pattern for two-dimensional motion.public Path getPatternPath()
public void setPatternPath(Path patternPath)
patternPath
- A Path to be used as a pattern for two-dimensional motion.public Path getPath(float startX, float startY, float endX, float endY)
PathMotion
(startX, startY)
and
(endX, endY)
. This allows controlled curved motion along two dimensions.getPath
in class PathMotion
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)
.