# PatternPathMotion

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:transition:28.0.0-alpha1  
Summary:[Ctors](https://developer.android.com/reference/android/support/transition/PatternPathMotion#pubctors)\|[Methods](https://developer.android.com/reference/android/support/transition/PatternPathMotion#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/transition/PatternPathMotion#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/transition/PatternPathMotion#)  

# PatternPathMotion

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
PatternPathMotion
`  
`


``

extends `[PathMotion](https://developer.android.com/reference/android/support/transition/PathMotion)`


``


`

|---|---|----------------------------------------------|
| java.lang.Object                                   |||
| ↳ | [android.support.transition.PathMotion](https://developer.android.com/reference/android/support/transition/PathMotion) ||
|   | ↳ | android.support.transition.PatternPathMotion |

<br />

*** ** * ** ***

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>
     
<br />

## Summary

|                                                                                                                                                                               ### Public constructors                                                                                                                                                                               ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[PatternPathMotion](https://developer.android.com/reference/android/support/transition/PatternPathMotion#PatternPathMotion())`() ` Constructs a PatternPathMotion with a straight-line pattern.                                                                                                                                                                               |
| ` `[PatternPathMotion](https://developer.android.com/reference/android/support/transition/PatternPathMotion#PatternPathMotion(android.content.Context, android.util.AttributeSet))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` attrs) ` |
| ` `[PatternPathMotion](https://developer.android.com/reference/android/support/transition/PatternPathMotion#PatternPathMotion(android.graphics.Path))`(`[Path](https://developer.android.com/reference/android/graphics/Path.html)` patternPath) ` Creates a PatternPathMotion with the Path defining a pattern of motion between two coordinates.                               |

|                                                                                                                                                                                       ### Public methods                                                                                                                                                                                        ||
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Path](https://developer.android.com/reference/android/graphics/Path.html) | ` `[getPath](https://developer.android.com/reference/android/support/transition/PatternPathMotion#getPath(float, float, float, float))`(float startX, float startY, float endX, float endY) ` Provide a Path to interpolate between two points`(startX, startY)`and`(endX, endY)`.                               |
| ` `[Path](https://developer.android.com/reference/android/graphics/Path.html) | ` `[getPatternPath](https://developer.android.com/reference/android/support/transition/PatternPathMotion#getPatternPath())`() ` Returns the Path defining a pattern of motion between two coordinates.                                                                                                           |
| ` void`                                                                       | ` `[setPatternPath](https://developer.android.com/reference/android/support/transition/PatternPathMotion#setPatternPath(android.graphics.Path))`(`[Path](https://developer.android.com/reference/android/graphics/Path.html)` patternPath) ` Sets the Path defining a pattern of motion between two coordinates. |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/transition/PatternPathMotion#)From class` `[android.support.transition.PathMotion](https://developer.android.com/reference/android/support/transition/PathMotion)` ` |----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[Path](https://developer.android.com/reference/android/graphics/Path.html) | ` `[getPath](https://developer.android.com/reference/android/support/transition/PathMotion#getPath(float, float, float, float))`(float startX, float startY, float endX, float endY) ` Provide a Path to interpolate between two points`(startX, startY)`and`(endX, endY)`. | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/transition/PatternPathMotion#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public constructors

### PatternPathMotion

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
PatternPathMotion ()
```

Constructs a PatternPathMotion with a straight-line pattern.

<br />

### PatternPathMotion

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
PatternPathMotion (Context context, 
                AttributeSet attrs)
```

<br />

<br />

|            Parameters            ||
|-----------|-----------------------|
| `context` | `Context` <br />      |
| `attrs`   | `AttributeSet` <br /> |

### PatternPathMotion

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|                                        Parameters                                        ||
|---------------|---------------------------------------------------------------------------|
| `patternPath` | `Path`: A Path to be used as a pattern for two-dimensional motion. <br /> |

## Public methods

### getPath

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|                            Parameters                             ||
|----------|---------------------------------------------------------|
| `startX` | `float`: The x coordinate of the starting point. <br /> |
| `startY` | `float`: The y coordinate of the starting point. <br /> |
| `endX`   | `float`: The x coordinate of the ending point. <br />   |
| `endY`   | `float`: The y coordinate of the ending point. <br />   |

|                                                                                                                                                                          Returns                                                                                                                                                                          ||
|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Path](https://developer.android.com/reference/android/graphics/Path.html) | A Path along which the points should be interpolated. The returned Path must start at point`(startX, startY)`, typically using[moveTo(float, float)](https://developer.android.com/reference/android/graphics/Path.html#moveTo(float, float))and end at`(endX, endY)`. <br /> |

### getPatternPath

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|                                                                      Returns                                                                      ||
|----------------------------------------------------------------------------|-----------------------------------------------------------------------|
| [Path](https://developer.android.com/reference/android/graphics/Path.html) | the Path defining a pattern of motion between two coordinates. <br /> |

### setPatternPath

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|                                        Parameters                                        ||
|---------------|---------------------------------------------------------------------------|
| `patternPath` | `Path`: A Path to be used as a pattern for two-dimensional motion. <br /> |

-

  ## Interfaces

  - [Transition.TransitionListener](https://developer.android.com/reference/android/support/transition/Transition.TransitionListener)
-

  ## Classes

  - [ArcMotion](https://developer.android.com/reference/android/support/transition/ArcMotion)
  - [AutoTransition](https://developer.android.com/reference/android/support/transition/AutoTransition)
  - [ChangeBounds](https://developer.android.com/reference/android/support/transition/ChangeBounds)
  - [ChangeClipBounds](https://developer.android.com/reference/android/support/transition/ChangeClipBounds)
  - [ChangeImageTransform](https://developer.android.com/reference/android/support/transition/ChangeImageTransform)
  - [ChangeScroll](https://developer.android.com/reference/android/support/transition/ChangeScroll)
  - [ChangeTransform](https://developer.android.com/reference/android/support/transition/ChangeTransform)
  - [CircularPropagation](https://developer.android.com/reference/android/support/transition/CircularPropagation)
  - [Explode](https://developer.android.com/reference/android/support/transition/Explode)
  - [Fade](https://developer.android.com/reference/android/support/transition/Fade)
  - [PathMotion](https://developer.android.com/reference/android/support/transition/PathMotion)
  - [PatternPathMotion](https://developer.android.com/reference/android/support/transition/PatternPathMotion)
  - [R](https://developer.android.com/reference/android/support/transition/R)
  - [R.attr](https://developer.android.com/reference/android/support/transition/R.attr)
  - [R.bool](https://developer.android.com/reference/android/support/transition/R.bool)
  - [R.color](https://developer.android.com/reference/android/support/transition/R.color)
  - [R.dimen](https://developer.android.com/reference/android/support/transition/R.dimen)
  - [R.drawable](https://developer.android.com/reference/android/support/transition/R.drawable)
  - [R.id](https://developer.android.com/reference/android/support/transition/R.id)
  - [R.integer](https://developer.android.com/reference/android/support/transition/R.integer)
  - [R.layout](https://developer.android.com/reference/android/support/transition/R.layout)
  - [R.string](https://developer.android.com/reference/android/support/transition/R.string)
  - [R.style](https://developer.android.com/reference/android/support/transition/R.style)
  - [R.styleable](https://developer.android.com/reference/android/support/transition/R.styleable)
  - [Scene](https://developer.android.com/reference/android/support/transition/Scene)
  - [SidePropagation](https://developer.android.com/reference/android/support/transition/SidePropagation)
  - [Slide](https://developer.android.com/reference/android/support/transition/Slide)
  - [Transition](https://developer.android.com/reference/android/support/transition/Transition)
  - [Transition.EpicenterCallback](https://developer.android.com/reference/android/support/transition/Transition.EpicenterCallback)
  - [TransitionInflater](https://developer.android.com/reference/android/support/transition/TransitionInflater)
  - [TransitionListenerAdapter](https://developer.android.com/reference/android/support/transition/TransitionListenerAdapter)
  - [TransitionManager](https://developer.android.com/reference/android/support/transition/TransitionManager)
  - [TransitionPropagation](https://developer.android.com/reference/android/support/transition/TransitionPropagation)
  - [TransitionSet](https://developer.android.com/reference/android/support/transition/TransitionSet)
  - [TransitionValues](https://developer.android.com/reference/android/support/transition/TransitionValues)
  - [Visibility](https://developer.android.com/reference/android/support/transition/Visibility)
  - [VisibilityPropagation](https://developer.android.com/reference/android/support/transition/VisibilityPropagation)