Methods Summary |
---|
public abstract android.animation.Keyframe | clone()
|
public float | getFraction()Gets the time for this keyframe, as a fraction of the overall animation duration.
return mFraction;
|
public TimeInterpolator | getInterpolator()Gets the optional interpolator for this Keyframe. A value of null indicates
that there is no interpolation, which is the same as linear interpolation.
return mInterpolator;
|
public java.lang.Class | getType()Gets the type of keyframe. This information is used by ValueAnimator to determine the type of
{@link TypeEvaluator} to use when calculating values between keyframes. The type is based
on the type of Keyframe created.
return mValueType;
|
public abstract java.lang.Object | getValue()Gets the value for this Keyframe.
|
public boolean | hasValue()Indicates whether this keyframe has a valid value. This method is called internally when
an {@link ObjectAnimator} first starts; keyframes without values are assigned values at
that time by deriving the value for the property from the target object.
return mHasValue;
|
public static android.animation.Keyframe | ofFloat(float fraction, float value)Constructs a Keyframe object with the given time and value. The time defines the
time, as a proportion of an overall animation's duration, at which the value will hold true
for the animation. The value for the animation between keyframes will be calculated as
an interpolation between the values at those keyframes.
return new FloatKeyframe(fraction, value);
|
public static android.animation.Keyframe | ofFloat(float fraction)Constructs a Keyframe object with the given time. The value at this time will be derived
from the target object when the animation first starts (note that this implies that keyframes
with no initial value must be used as part of an {@link ObjectAnimator}).
The time defines the
time, as a proportion of an overall animation's duration, at which the value will hold true
for the animation. The value for the animation between keyframes will be calculated as
an interpolation between the values at those keyframes.
return new FloatKeyframe(fraction);
|
public static android.animation.Keyframe | ofInt(float fraction, int value)Constructs a Keyframe object with the given time and value. The time defines the
time, as a proportion of an overall animation's duration, at which the value will hold true
for the animation. The value for the animation between keyframes will be calculated as
an interpolation between the values at those keyframes.
return new IntKeyframe(fraction, value);
|
public static android.animation.Keyframe | ofInt(float fraction)Constructs a Keyframe object with the given time. The value at this time will be derived
from the target object when the animation first starts (note that this implies that keyframes
with no initial value must be used as part of an {@link ObjectAnimator}).
The time defines the
time, as a proportion of an overall animation's duration, at which the value will hold true
for the animation. The value for the animation between keyframes will be calculated as
an interpolation between the values at those keyframes.
return new IntKeyframe(fraction);
|
public static android.animation.Keyframe | ofObject(float fraction, java.lang.Object value)Constructs a Keyframe object with the given time and value. The time defines the
time, as a proportion of an overall animation's duration, at which the value will hold true
for the animation. The value for the animation between keyframes will be calculated as
an interpolation between the values at those keyframes.
return new ObjectKeyframe(fraction, value);
|
public static android.animation.Keyframe | ofObject(float fraction)Constructs a Keyframe object with the given time. The value at this time will be derived
from the target object when the animation first starts (note that this implies that keyframes
with no initial value must be used as part of an {@link ObjectAnimator}).
The time defines the
time, as a proportion of an overall animation's duration, at which the value will hold true
for the animation. The value for the animation between keyframes will be calculated as
an interpolation between the values at those keyframes.
return new ObjectKeyframe(fraction, null);
|
public void | setFraction(float fraction)Sets the time for this keyframe, as a fraction of the overall animation duration.
mFraction = fraction;
|
public void | setInterpolator(TimeInterpolator interpolator)Sets the optional interpolator for this Keyframe. A value of null indicates
that there is no interpolation, which is the same as linear interpolation.
mInterpolator = interpolator;
|
public abstract void | setValue(java.lang.Object value)Sets the value for this Keyframe.
|
void | setValueWasSetOnStart(boolean valueWasSetOnStart)
mValueWasSetOnStart = valueWasSetOnStart;
|
boolean | valueWasSetOnStart()If the Keyframe's value was acquired from the target object, this flag should be set so that,
if target changes, value will be reset.
return mValueWasSetOnStart;
|