java.lang.Object | ||
↳ | android.transition.PathMotion | |
↳ | android.transition.ArcMotion |
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, setMinimumHorizontalAngle(float)
and
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>
XML Attributes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
android:maximumAngle | setMaximumAngle(float) | The maximum arc angle in degrees between the start and end points. | |||||||||
android:minimumHorizontalAngle | setMinimumHorizontalAngle(float) | The minimum arc angle in degrees between the start and end points when they are close to horizontal. | |||||||||
android:minimumVerticalAngle | setMinimumVerticalAngle(float) | The minimum arc angle in degrees between the start and end points when they are close to vertical. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the maximum arc along the circle between two points.
| |||||||||||
Returns the minimum arc along the circle between two points aligned near horizontally.
| |||||||||||
Returns the minimum arc along the circle between two points aligned near vertically.
| |||||||||||
Provide a Path to interpolate between two points
(startX, startY) and
(endX, endY) .
| |||||||||||
Sets the maximum arc along the circle between two points.
| |||||||||||
Sets the minimum arc along the circle between two points aligned near horizontally.
| |||||||||||
Sets the minimum arc along the circle between two points aligned near vertically.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.transition.PathMotion
| |||||||||||
From class
java.lang.Object
|
The maximum arc angle in degrees between the start and end points.
Must be a floating point value, such as "1.2
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
This corresponds to the global attribute
resource symbol maximumAngle
.
The minimum arc angle in degrees between the start and end points when they are close to horizontal.
Must be a floating point value, such as "1.2
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
This corresponds to the global attribute
resource symbol minimumHorizontalAngle
.
The minimum arc angle in degrees between the start and end points when they are close to vertical.
Must be a floating point value, such as "1.2
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
This corresponds to the global attribute
resource symbol minimumVerticalAngle
.
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.
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.
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.
Provide a Path to interpolate between two points (startX, startY)
and
(endX, endY)
. This allows controlled curved motion along two dimensions.
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
moveTo(float, float)
and end at (endX, endY)
.
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.
angleInDegrees | The maximum angle of the arc on a circle describing the Path between the start and end points. |
---|
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.
angleInDegrees | The minimum angle of the arc on a circle describing the Path between two nearly horizontally-separated points. |
---|
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.
angleInDegrees | The minimum angle of the arc on a circle describing the Path between two nearly vertically-separated points. |
---|