Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/transition/PathMotion#pubctors) \| [Methods](https://developer.android.com/reference/android/transition/PathMotion#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/transition/PathMotion#inhmethods)

# PathMotion

*** ** * ** ***

` public abstract class PathMotion `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

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

Known direct subclasses [ArcMotion](https://developer.android.com/reference/android/transition/ArcMotion), [PatternPathMotion](https://developer.android.com/reference/android/transition/PatternPathMotion) [ArcMotion](https://developer.android.com/reference/android/transition/ArcMotion) A PathMotion that generates a curved path along an arc on an imaginary circle containing the two points. [PatternPathMotion](https://developer.android.com/reference/android/transition/PatternPathMotion) A PathMotion that takes a Path pattern and applies it to the separation between two points.   

*** ** * ** ***

This base class can be extended to provide motion along a Path to Transitions.

Transitions such as `https://developer.android.com/reference/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 `https://developer.android.com/reference/android/transition/PathMotion#getPath(float,%20float,%20float,%20float)`.

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

    <changeBounds>
        <pathMotion class="my.app.transition.MyPathMotion"/>
    </changeBounds>

<br />

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/transition/PathMotion#PathMotion()() ` |
| ` https://developer.android.com/reference/android/transition/PathMotion#PathMotion(android.content.Context,%20android.util.AttributeSet)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/util/AttributeSet attrs) ` |

| ### Public methods ||
|---|---|
| ` abstract https://developer.android.com/reference/android/graphics/Path` | ` https://developer.android.com/reference/android/transition/PathMotion#getPath(float,%20float,%20float,%20float)(float startX, float startY, float endX, float endY) ` Provide a Path to interpolate between two points `(startX, startY)` and `(endX, endY)`. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### PathMotion

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PathMotion ()
```

<br />

<br />

### PathMotion

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PathMotion (Context context, 
                AttributeSet attrs)
```

<br />

<br />

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

## Public methods

### getPath

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract 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 ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Path` | A Path along which the points should be interpolated. The returned Path must start at point `(startX, startY)`, typically using `https://developer.android.com/reference/android/graphics/Path#moveTo(float,%20float)` and end at `(endX, endY)`. <br /> |