ObjectAnimator.OfObject Method

Definition

Overloads

OfObject(Object, Property, ITypeEvaluator, Object[])

Constructs and returns an ObjectAnimator that animates between Object values.

OfObject(Object, Property, TypeConverter, Path)

Constructs and returns an ObjectAnimator that animates a property along a Path.

OfObject(Object, String, ITypeEvaluator, Object[])

Constructs and returns an ObjectAnimator that animates between Object values.

OfObject(Object, String, TypeConverter, Path)

Constructs and returns an ObjectAnimator that animates a property along a Path.

OfObject(Object, Property, TypeConverter, ITypeEvaluator, Object[])

Constructs and returns an ObjectAnimator that animates between Object values.

OfObject(Object, Property, ITypeEvaluator, Object[])

Constructs and returns an ObjectAnimator that animates between Object values.

[Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Landroid/util/Property;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/ObjectAnimator;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T", "V" })]
public static Android.Animation.ObjectAnimator OfObject (Java.Lang.Object? target, Android.Util.Property? property, Android.Animation.ITypeEvaluator? evaluator, params Java.Lang.Object[]? values);
[<Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Landroid/util/Property;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/ObjectAnimator;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T", "V" })>]
static member OfObject : Java.Lang.Object * Android.Util.Property * Android.Animation.ITypeEvaluator * Java.Lang.Object[] -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose property is to be animated.

property
Property

The property being animated.

evaluator
ITypeEvaluator

A TypeEvaluator that will be called on each animation frame to provide the necessary interpolation between the Object values to derive the animated value.

values
Object[]

A set of values that the animation will animate between over time.

Returns

An ObjectAnimator object that is set up to animate between the given values.

Attributes

Remarks

Constructs and returns an ObjectAnimator that animates between Object values. A single value implies that that value is the one being animated to, in which case the start value will be derived from the property being animated and the target object when #start() is called for the first time. Two values imply starting and ending values. More than two values imply a starting value, values to animate through along the way, and an ending value (these values will be distributed evenly across the duration of the animation).

<strong>Note:</strong> The values are stored as references to the original objects, which means that changes to those objects after this method is called will affect the values on the animator. If the objects will be mutated externally after this method is called, callers should pass a copy of those objects instead.

Java documentation for android.animation.ObjectAnimator.ofObject(T, android.util.Property<T, V>, android.animation.TypeEvaluator<V>, V...).

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.

Applies to

OfObject(Object, Property, TypeConverter, Path)

Constructs and returns an ObjectAnimator that animates a property along a Path.

[Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Landroid/util/Property;Landroid/animation/TypeConverter;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T", "V" })]
public static Android.Animation.ObjectAnimator OfObject (Java.Lang.Object? target, Android.Util.Property property, Android.Animation.TypeConverter? converter, Android.Graphics.Path? path);
[<Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Landroid/util/Property;Landroid/animation/TypeConverter;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T", "V" })>]
static member OfObject : Java.Lang.Object * Android.Util.Property * Android.Animation.TypeConverter * Android.Graphics.Path -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose property is to be animated.

property
Property

The property being animated. Should not be null.

converter
TypeConverter

Converts a PointF to the type associated with the setter. May be null if conversion is unnecessary.

path
Path

The Path to animate values along.

Returns

An ObjectAnimator object that is set up to animate along path.

Attributes

Remarks

Constructs and returns an ObjectAnimator that animates a property along a Path. A Path</> animation moves in two dimensions, animating coordinates (x, y) together to follow the line. This variant animates the coordinates in a PointF to follow the Path. If property uses a type other than PointF, converter can be used to change from PointF to the type associated with the Property.

The PointF passed to converter or property, if converter is null, is reused on each animation frame and should not be stored by the setter or TypeConverter.

Java documentation for android.animation.ObjectAnimator.ofObject(T, android.util.Property<T, V>, android.animation.TypeConverter<android.graphics.PointF, V>, android.graphics.Path).

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.

Applies to

OfObject(Object, String, ITypeEvaluator, Object[])

Constructs and returns an ObjectAnimator that animates between Object values.

[Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Ljava/lang/String;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/ObjectAnimator;", "")]
public static Android.Animation.ObjectAnimator? OfObject (Java.Lang.Object? target, string? propertyName, Android.Animation.ITypeEvaluator? evaluator, params Java.Lang.Object[]? values);
[<Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Ljava/lang/String;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/ObjectAnimator;", "")>]
static member OfObject : Java.Lang.Object * string * Android.Animation.ITypeEvaluator * Java.Lang.Object[] -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose property is to be animated.

propertyName
String
evaluator
ITypeEvaluator

A TypeEvaluator that will be called on each animation frame to provide the necessary interpolation between the Object values to derive the animated value.

values
Object[]

A set of values that the animation will animate between over time.

Returns

An ObjectAnimator object that is set up to animate between the given values.

Attributes

Remarks

Java documentation for android.animation.ObjectAnimator.ofObject(java.lang.Object, android.util.Property, android.animation.TypeConverter, android.animation.TypeEvaluator, java.lang.Object).

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.

Applies to

OfObject(Object, String, TypeConverter, Path)

Constructs and returns an ObjectAnimator that animates a property along a Path.

[Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Ljava/lang/String;Landroid/animation/TypeConverter;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;", "")]
public static Android.Animation.ObjectAnimator OfObject (Java.Lang.Object? target, string? propertyName, Android.Animation.TypeConverter? converter, Android.Graphics.Path? path);
[<Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Ljava/lang/String;Landroid/animation/TypeConverter;Landroid/graphics/Path;)Landroid/animation/ObjectAnimator;", "")>]
static member OfObject : Java.Lang.Object * string * Android.Animation.TypeConverter * Android.Graphics.Path -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose property is to be animated. This object should have a public method on it called setName(), where name is the value of the propertyName parameter.

propertyName
String

The name of the property being animated.

converter
TypeConverter

Converts a PointF to the type associated with the setter. May be null if conversion is unnecessary.

path
Path

The Path to animate values along.

Returns

An ObjectAnimator object that is set up to animate along path.

Attributes

Remarks

Constructs and returns an ObjectAnimator that animates a property along a Path. A Path</> animation moves in two dimensions, animating coordinates (x, y) together to follow the line. This variant animates the coordinates in a PointF to follow the Path. If the Property associated with propertyName uses a type other than PointF, converter can be used to change from PointF to the type associated with the Property.

Java documentation for android.animation.ObjectAnimator.ofObject(java.lang.Object, java.lang.String, android.animation.TypeConverter<android.graphics.PointF, ?>, android.graphics.Path).

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.

Applies to

OfObject(Object, Property, TypeConverter, ITypeEvaluator, Object[])

Constructs and returns an ObjectAnimator that animates between Object values.

[Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Landroid/util/Property;Landroid/animation/TypeConverter;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/ObjectAnimator;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T", "V", "P" })]
public static Android.Animation.ObjectAnimator OfObject (Java.Lang.Object? target, Android.Util.Property? property, Android.Animation.TypeConverter? converter, Android.Animation.ITypeEvaluator? evaluator, params Java.Lang.Object[]? values);
[<Android.Runtime.Register("ofObject", "(Ljava/lang/Object;Landroid/util/Property;Landroid/animation/TypeConverter;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/ObjectAnimator;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T", "V", "P" })>]
static member OfObject : Java.Lang.Object * Android.Util.Property * Android.Animation.TypeConverter * Android.Animation.ITypeEvaluator * Java.Lang.Object[] -> Android.Animation.ObjectAnimator

Parameters

target
Object

The object whose property is to be animated.

property
Property

The property being animated.

converter
TypeConverter

Converts the animated object to the Property type.

evaluator
ITypeEvaluator

A TypeEvaluator that will be called on each animation frame to provide the necessary interpolation between the Object values to derive the animated value.

values
Object[]

A set of values that the animation will animate between over time.

Returns

An ObjectAnimator object that is set up to animate between the given values.

Attributes

Remarks

Constructs and returns an ObjectAnimator that animates between Object values. A single value implies that that value is the one being animated to, in which case the start value will be derived from the property being animated and the target object when #start() is called for the first time. Two values imply starting and ending values. More than two values imply a starting value, values to animate through along the way, and an ending value (these values will be distributed evenly across the duration of the animation). This variant supplies a TypeConverter to convert from the animated values to the type of the property. If only one value is supplied, the TypeConverter must be a android.animation.BidirectionalTypeConverter to retrieve the current value.

<strong>Note:</strong> The values are stored as references to the original objects, which means that changes to those objects after this method is called will affect the values on the animator. If the objects will be mutated externally after this method is called, callers should pass a copy of those objects instead.

Java documentation for android.animation.ObjectAnimator.ofObject(T, android.util.Property<T, P>, android.animation.TypeConverter<V, P>, android.animation.TypeEvaluator<V>, V...).

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.

Applies to