PatternPathMotion
public
class
PatternPathMotion
extends PathMotion
java.lang.Object | ||
↳ | android.transition.PathMotion | |
↳ | android.transition.PatternPathMotion |
A PathMotion that takes a Path pattern and applies it to the separation between two points. The starting point of the Path will be moved to the origin and the end point will be scaled and rotated so that it matches with the target end point.
This may be used in XML as an element inside a transition.
<changeBounds>
<patternPathMotion android:patternPathData="M0 0 L0 100 L100 100"/>
</changeBounds>
Summary
XML attributes | |
---|---|
android:patternPathData |
The path string describing the pattern to use for the PathPathMotion. |
Public constructors | |
---|---|
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. |
Public methods | |
---|---|
Path
|
getPath(float startX, float startY, float endX, float endY)
Provide a Path to interpolate between two points |
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. |
Inherited methods | |
---|---|
XML attributes
android:patternPathData
The path string describing the pattern to use for the PathPathMotion.
May be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character;
Related methods:
Public constructors
PatternPathMotion
public PatternPathMotion ()
Constructs a PatternPathMotion with a straight-line pattern.
PatternPathMotion
public PatternPathMotion (Context context, AttributeSet attrs)
Parameters | |
---|---|
context |
Context |
attrs |
AttributeSet |
PatternPathMotion
public PatternPathMotion (Path patternPath)
Creates a PatternPathMotion with the Path defining a pattern of motion between two coordinates. The pattern will be translated, rotated, and scaled to fit between the start and end points. The pattern must not be empty and must have the end point differ from the start point.
Parameters | |
---|---|
patternPath |
Path : A Path to be used as a pattern for two-dimensional motion. |
Public methods
getPath
public Path getPath (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.
Parameters | |
---|---|
startX |
float : The x coordinate of the starting point. |
startY |
float : The y coordinate of the starting point. |
endX |
float : The x coordinate of the ending point. |
endY |
float : The y coordinate of the ending point. |
Returns | |
---|---|
Path |
A Path along which the points should be interpolated. The returned Path
must start at point (startX, startY) , typically using
Path.moveTo(float, float) and end at (endX, endY) . |
getPatternPath
public Path getPatternPath ()
Returns the Path defining a pattern of motion between two coordinates. The pattern will be translated, rotated, and scaled to fit between the start and end points. The pattern must not be empty and must have the end point differ from the start point.
Related XML Attributes:
Returns | |
---|---|
Path |
the Path defining a pattern of motion between two coordinates. |
setPatternPath
public void setPatternPath (Path patternPath)
Sets the Path defining a pattern of motion between two coordinates. The pattern will be translated, rotated, and scaled to fit between the start and end points. The pattern must not be empty and must have the end point differ from the start point.
Related XML Attributes:
Parameters | |
---|---|
patternPath |
Path : A Path to be used as a pattern for two-dimensional motion. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
TMZ Celebrity News – Breaking Stories, Videos & Gossip
Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.
Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.
🎥 Watch TMZ Live
TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.
- Exclusive TMZ interviews and court updates
- Viral celebrity videos and candid photos
- Trending gossip and entertainment news