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

# ArcMotion

*** ** * ** ***


`
public


class
ArcMotion
`


`


`

`

extends https://developer.android.com/reference/android/transition/PathMotion


`

`


`

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

<br />

*** ** * ** ***

A PathMotion that generates a curved path along an arc on an imaginary circle containing
the two points. If the horizontal distance between the points is less than the vertical
distance, then the circle's center point will be horizontally aligned with the end point. If the
vertical distance is less than the horizontal distance then the circle's center point
will be vertically aligned with the end point.


When the two points are near horizontal or vertical, the curve of the motion will be
small as the center of the circle will be far from both points. To force curvature of
the path, `https://developer.android.com/reference/android/transition/ArcMotion#setMinimumHorizontalAngle(float)` and
`https://developer.android.com/reference/android/transition/ArcMotion#setMinimumVerticalAngle(float)` may be used to set the minimum angle of the
arc between two points.

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

    <changeBounds>
      <arcMotion android:minimumHorizontalAngle="15"
                 android:minimumVerticalAngle="0"
                 android:maximumAngle="90"/>
    </changeBounds>

<br />

## Summary

| ### XML attributes ||
|---|---|
| [`android:maximumAngle`](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:maximumAngle) | The maximum arc angle in degrees between the start and end points. |
| [`android:minimumHorizontalAngle`](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:minimumHorizontalAngle) | The minimum arc angle in degrees between the start and end points when they are close to horizontal. |
| [`android:minimumVerticalAngle`](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:minimumVerticalAngle) | The minimum arc angle in degrees between the start and end points when they are close to vertical. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/transition/ArcMotion#ArcMotion()() ` |
| ` https://developer.android.com/reference/android/transition/ArcMotion#ArcMotion(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 ||
|---|---|
| ` float` | ` https://developer.android.com/reference/android/transition/ArcMotion#getMaximumAngle()() ` Returns the maximum arc along the circle between two points. |
| ` float` | ` https://developer.android.com/reference/android/transition/ArcMotion#getMinimumHorizontalAngle()() ` Returns the minimum arc along the circle between two points aligned near horizontally. |
| ` float` | ` https://developer.android.com/reference/android/transition/ArcMotion#getMinimumVerticalAngle()() ` Returns the minimum arc along the circle between two points aligned near vertically. |
| ` https://developer.android.com/reference/android/graphics/Path` | ` https://developer.android.com/reference/android/transition/ArcMotion#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)`. |
| ` void` | ` https://developer.android.com/reference/android/transition/ArcMotion#setMaximumAngle(float)(float angleInDegrees) ` Sets the maximum arc along the circle between two points. |
| ` void` | ` https://developer.android.com/reference/android/transition/ArcMotion#setMinimumHorizontalAngle(float)(float angleInDegrees) ` Sets the minimum arc along the circle between two points aligned near horizontally. |
| ` void` | ` https://developer.android.com/reference/android/transition/ArcMotion#setMinimumVerticalAngle(float)(float angleInDegrees) ` Sets the minimum arc along the circle between two points aligned near vertically. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/transition/PathMotion ` |---|---| | ` 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)`. | ||
| 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*. | ||

## XML attributes

### android:maximumAngle

The maximum arc angle in degrees between the start and end points.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/transition/ArcMotion#setMaximumAngle(float)`

### android:minimumHorizontalAngle

The minimum arc angle in degrees between the start and end points when
they are close to horizontal.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/transition/ArcMotion#setMinimumHorizontalAngle(float)`

### android:minimumVerticalAngle

The minimum arc angle in degrees between the start and end points when
they are close to vertical.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/transition/ArcMotion#setMinimumVerticalAngle(float)`

## Public constructors

### ArcMotion

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

```
public ArcMotion ()
```

<br />

<br />

### ArcMotion

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

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

<br />

<br />

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

## Public methods

### getMaximumAngle

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

```
public float getMaximumAngle ()
```

Returns the maximum arc along the circle between two points. When start and end points
have close to equal x and y differences, the curve between them is large. This forces
the curved path to have an arc of at most the given angle.

The default value is 70 degrees.

<br />

<br />

**Related XML Attributes:**

- [android:maximumAngle](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:maximumAngle)

| Returns ||
|---|---|
| `float` | The maximum angle of the arc on a circle describing the Path between the start and end points. <br /> |

### getMinimumHorizontalAngle

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

```
public float getMinimumHorizontalAngle ()
```

Returns the minimum arc along the circle between two points aligned near horizontally.
When start and end points are close to horizontal, the calculated center point of the
circle will be far from both points, giving a near straight path between the points.
By setting a minimum angle, this forces the center point to be closer and give an
exaggerated curve to the path.

The default value is 0.

<br />

<br />

**Related XML Attributes:**

- [android:minimumHorizontalAngle](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:minimumHorizontalAngle)

| Returns ||
|---|---|
| `float` | The minimum arc along the circle between two points aligned near horizontally. <br /> |

### getMinimumVerticalAngle

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

```
public float getMinimumVerticalAngle ()
```

Returns the minimum arc along the circle between two points aligned near vertically.
When start and end points are close to vertical, the calculated center point of the
circle will be far from both points, giving a near straight path between the points.
By setting a minimum angle, this forces the center point to be closer and give an
exaggerated curve to the path.

The default value is 0.

<br />

<br />

**Related XML Attributes:**

- [android:minimumVerticalAngle](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:minimumVerticalAngle)

| Returns ||
|---|---|
| `float` | The minimum angle of the arc on a circle describing the Path between two nearly vertically-separated points. <br /> |

### getPath

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

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

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

### setMaximumAngle

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

```
public void setMaximumAngle (float angleInDegrees)
```

Sets the maximum arc along the circle between two points. When start and end points
have close to equal x and y differences, the curve between them is large. This forces
the curved path to have an arc of at most the given angle.

The default value is 70 degrees.

<br />

<br />

**Related XML Attributes:**

- [android:maximumAngle](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:maximumAngle)

| Parameters ||
|---|---|
| `angleInDegrees` | `float`: The maximum angle of the arc on a circle describing the Path between the start and end points. <br /> |

### setMinimumHorizontalAngle

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

```
public void setMinimumHorizontalAngle (float angleInDegrees)
```

Sets the minimum arc along the circle between two points aligned near horizontally.
When start and end points are close to horizontal, the calculated center point of the
circle will be far from both points, giving a near straight path between the points.
By setting a minimum angle, this forces the center point to be closer and give an
exaggerated curve to the path.

The default value is 0.

<br />

<br />

**Related XML Attributes:**

- [android:minimumHorizontalAngle](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:minimumHorizontalAngle)

| Parameters ||
|---|---|
| `angleInDegrees` | `float`: The minimum angle of the arc on a circle describing the Path between two nearly horizontally-separated points. <br /> |

### setMinimumVerticalAngle

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

```
public void setMinimumVerticalAngle (float angleInDegrees)
```

Sets the minimum arc along the circle between two points aligned near vertically.
When start and end points are close to vertical, the calculated center point of the
circle will be far from both points, giving a near straight path between the points.
By setting a minimum angle, this forces the center point to be closer and give an
exaggerated curve to the path.

The default value is 0.

<br />

<br />

**Related XML Attributes:**

- [android:minimumVerticalAngle](https://developer.android.com/reference/android/transition/ArcMotion#attr_android:minimumVerticalAngle)

| Parameters ||
|---|---|
| `angleInDegrees` | `float`: The minimum angle of the arc on a circle describing the Path between two nearly vertically-separated points. <br /> |