Share via


TranslateAnimation Constructors

Definition

Overloads

TranslateAnimation(Context, IAttributeSet)

Constructor used when a TranslateAnimation is loaded from a resource.

TranslateAnimation(IntPtr, JniHandleOwnership)

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

TranslateAnimation(Single, Single, Single, Single)

Constructor to use when building a TranslateAnimation from code

TranslateAnimation(Dimension, Single, Dimension, Single, Dimension, Single, Dimension, Single)

Constructor to use when building a TranslateAnimation from code

TranslateAnimation(Context, IAttributeSet)

Constructor used when a TranslateAnimation is loaded from a resource.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")]
public TranslateAnimation (Android.Content.Context? context, Android.Util.IAttributeSet? attrs);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")>]
new Android.Views.Animations.TranslateAnimation : Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.Animations.TranslateAnimation

Parameters

context
Context

Application context to use

attrs
IAttributeSet

Attribute set from which to read values

Attributes

Remarks

Constructor used when a TranslateAnimation is loaded from a resource.

Java documentation for android.view.animation.TranslateAnimation.TranslateAnimation(android.content.Context, android.util.AttributeSet).

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

TranslateAnimation(IntPtr, JniHandleOwnership)

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

protected TranslateAnimation (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Views.Animations.TranslateAnimation : nativeint * Android.Runtime.JniHandleOwnership -> Android.Views.Animations.TranslateAnimation

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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

TranslateAnimation(Single, Single, Single, Single)

Constructor to use when building a TranslateAnimation from code

[Android.Runtime.Register(".ctor", "(FFFF)V", "")]
public TranslateAnimation (float fromXDelta, float toXDelta, float fromYDelta, float toYDelta);
[<Android.Runtime.Register(".ctor", "(FFFF)V", "")>]
new Android.Views.Animations.TranslateAnimation : single * single * single * single -> Android.Views.Animations.TranslateAnimation

Parameters

fromXDelta
Single

Change in X coordinate to apply at the start of the animation

toXDelta
Single

Change in X coordinate to apply at the end of the animation

fromYDelta
Single

Change in Y coordinate to apply at the start of the animation

toYDelta
Single

Change in Y coordinate to apply at the end of the animation

Attributes

Remarks

Constructor to use when building a TranslateAnimation from code

Java documentation for android.view.animation.TranslateAnimation.TranslateAnimation(float, float, float, float).

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

TranslateAnimation(Dimension, Single, Dimension, Single, Dimension, Single, Dimension, Single)

Constructor to use when building a TranslateAnimation from code

[Android.Runtime.Register(".ctor", "(IFIFIFIF)V", "")]
public TranslateAnimation (Android.Views.Animations.Dimension fromXType, float fromXValue, Android.Views.Animations.Dimension toXType, float toXValue, Android.Views.Animations.Dimension fromYType, float fromYValue, Android.Views.Animations.Dimension toYType, float toYValue);
[<Android.Runtime.Register(".ctor", "(IFIFIFIF)V", "")>]
new Android.Views.Animations.TranslateAnimation : Android.Views.Animations.Dimension * single * Android.Views.Animations.Dimension * single * Android.Views.Animations.Dimension * single * Android.Views.Animations.Dimension * single -> Android.Views.Animations.TranslateAnimation

Parameters

fromXType
Dimension

Specifies how fromXValue should be interpreted. One of Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT.

fromXValue
Single

Change in X coordinate to apply at the start of the animation. This value can either be an absolute number if fromXType is ABSOLUTE, or a percentage (where 1.0 is 100%) otherwise.

toXType
Dimension

Specifies how toXValue should be interpreted. One of Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT.

toXValue
Single

Change in X coordinate to apply at the end of the animation. This value can either be an absolute number if toXType is ABSOLUTE, or a percentage (where 1.0 is 100%) otherwise.

fromYType
Dimension

Specifies how fromYValue should be interpreted. One of Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT.

fromYValue
Single

Change in Y coordinate to apply at the start of the animation. This value can either be an absolute number if fromYType is ABSOLUTE, or a percentage (where 1.0 is 100%) otherwise.

toYType
Dimension

Specifies how toYValue should be interpreted. One of Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT.

toYValue
Single

Change in Y coordinate to apply at the end of the animation. This value can either be an absolute number if toYType is ABSOLUTE, or a percentage (where 1.0 is 100%) otherwise.

Attributes

Remarks

Constructor to use when building a TranslateAnimation from code

Java documentation for android.view.animation.TranslateAnimation.TranslateAnimation(int, float, int, float, int, float, int, float).

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