public class Transition extends Object
| 构造器 | 说明 |
|---|---|
Transition() |
Default constructor used to create a
Transition instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
setCurve(Animator.TimelineCurve curve) |
Sets the curve.
|
void |
setCurveType(int type) |
Sets the curve type.
|
void |
setDuration(float duration) |
已过时。
This change is effective since API version 8. This method is deprecated because the
duration
parameter is an integer and does not need to be represented by a floating point number.
Replaced by setDuration(long). |
void |
setDuration(long duration) |
Sets the duration for the transition.
|
public Transition()
Transition instance.
This constructor uses the default attribute set and style.
@Deprecated public void setDuration(float duration)
duration
parameter is an integer and does not need to be represented by a floating point number.
Replaced by setDuration(long).duration - Indicates the duration in milliseconds.public void setDuration(long duration)
duration - Indicates the duration in milliseconds.public void setCurveType(int type)
This method uses the built-in curve types to set the transition curve effect.
type - Indicates the curve type to set. For details about the built-in curve types, see
Animator.CurveType.public void setCurve(Animator.TimelineCurve curve)
This method uses custom curves to set the transition curve effect.
curve - Indicates the curve to set. You can obtain a value that represents a fraction in a timeline curve
based on the specified time.