Keyframe Class

Definition

This class holds a time/value pair for an animation.

[Android.Runtime.Register("android/animation/Keyframe", DoNotGenerateAcw=true)]
public abstract class Keyframe : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.ICloneable
[<Android.Runtime.Register("android/animation/Keyframe", DoNotGenerateAcw=true)>]
type Keyframe = class
    inherit Object
    interface ICloneable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
Keyframe
Attributes
Implements

Remarks

This class holds a time/value pair for an animation. The Keyframe class is used by ValueAnimator to define the values that the animation target will have over the course of the animation. As the time proceeds from one keyframe to the other, the value of the target object will animate between the value at the previous keyframe and the value at the next keyframe. Each keyframe also holds an optional TimeInterpolator object, which defines the time interpolation over the intervalue preceding the keyframe.

The Keyframe class itself is abstract. The type-specific factory methods will return a subclass of Keyframe specific to the type of value being stored. This is done to improve performance when dealing with the most common cases (e.g., float and int values). Other types will fall into a more general Keyframe class that treats its values as Objects. Unless your animation requires dealing with a custom type or a data structure that needs to be animated directly (and evaluated using an implementation of TypeEvaluator), you should stick to using float and int as animations using those types have lower runtime overhead than other types.

Java documentation for android.animation.Keyframe.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

Keyframe()
Keyframe(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Fraction

Gets the time for this keyframe, as a fraction of the overall animation duration. -or- Sets the time for this keyframe, as a fraction of the overall animation duration.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasValue

Indicates whether this keyframe has a valid value.

Interpolator

Gets the optional interpolator for this Keyframe. -or- Sets the optional interpolator for this Keyframe.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Type

Gets the type of keyframe.

Value

Gets the value for this Keyframe.

Methods

Clone()

Creates and returns a copy of this Object.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
OfFloat(Single)

Constructs a Keyframe object with the given time.

OfFloat(Single, Single)

Constructs a Keyframe object with the given time and value.

OfInt(Single)

Constructs a Keyframe object with the given time.

OfInt(Single, Int32)

Constructs a Keyframe object with the given time and value.

OfObject(Single)

Constructs a Keyframe object with the given time.

OfObject(Single, Object)

Constructs a Keyframe object with the given time and value.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to