ViewPropertyAnimator Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class enables automatic and optimized animation of select properties on View objects.
[Android.Runtime.Register("android/view/ViewPropertyAnimator", DoNotGenerateAcw=true)]
public class ViewPropertyAnimator : Java.Lang.Object
[<Android.Runtime.Register("android/view/ViewPropertyAnimator", DoNotGenerateAcw=true)>]
type ViewPropertyAnimator = class
inherit Object
- Inheritance
- Attributes
Remarks
This class enables automatic and optimized animation of select properties on View objects. If only one or two properties on a View object are being animated, then using an android.animation.ObjectAnimator
is fine; the property setters called by ObjectAnimator are well equipped to do the right thing to set the property and invalidate the view appropriately. But if several properties are animated simultaneously, or if you just want a more convenient syntax to animate a specific property, then ViewPropertyAnimator might be more well-suited to the task.
This class may provide better performance for several simultaneous animations, because it will optimize invalidate calls to take place only once for several properties instead of each animated property independently causing its own invalidation. Also, the syntax of using this class could be easier to use because the caller need only tell the View object which property to animate, and the value to animate either to or by, and this class handles the details of configuring the underlying Animator class and starting it.
This class is not constructed by the caller, but rather by the View whose properties it will animate. Calls to android.view.View#animate()
will return a reference to the appropriate ViewPropertyAnimator object for that View.
Java documentation for android.view.ViewPropertyAnimator
.
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
ViewPropertyAnimator(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Properties
Class |
Returns the runtime class of this |
Duration |
Returns the current duration of property animations. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
Interpolator |
Returns the timing interpolator that this animation uses. |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
StartDelay |
Returns the current startDelay of property animations. |
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. |
Methods
Alpha(Single) |
This method will cause the View's |
AlphaBy(Single) |
This method will cause the View's |
Cancel() |
Cancels all property animations that are currently running or pending. |
Clone() |
Creates and returns a copy of this object. (Inherited from 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) |
Rotation(Single) |
This method will cause the View's |
RotationBy(Single) |
This method will cause the View's |
RotationX(Single) |
This method will cause the View's |
RotationXBy(Single) |
This method will cause the View's |
RotationY(Single) |
This method will cause the View's |
RotationYBy(Single) |
This method will cause the View's |
ScaleX(Single) |
This method will cause the View's |
ScaleXBy(Single) |
This method will cause the View's |
ScaleY(Single) |
This method will cause the View's |
ScaleYBy(Single) |
This method will cause the View's |
SetDuration(Int64) |
Sets the duration for the underlying animator that animates the requested properties. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SetInterpolator(ITimeInterpolator) |
Sets the interpolator for the underlying animator that animates the requested properties. |
SetListener(Animator+IAnimatorListener) |
Sets a listener for events in the underlying Animators that run the property animations. |
SetStartDelay(Int64) |
Sets the startDelay for the underlying animator that animates the requested properties. |
SetUpdateListener(ValueAnimator+IAnimatorUpdateListener) |
Sets a listener for update events in the underlying ValueAnimator that runs the property animations. |
Start() |
Starts the currently pending property animations immediately. |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
TranslationX(Single) |
This method will cause the View's |
TranslationXBy(Single) |
This method will cause the View's |
TranslationY(Single) |
This method will cause the View's |
TranslationYBy(Single) |
This method will cause the View's |
TranslationZ(Single) |
This method will cause the View's |
TranslationZBy(Single) |
This method will cause the View's |
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, 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) |
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) |
WithEndAction(IRunnable) |
Specifies an action to take place when the next animation ends. |
WithLayer() |
The View associated with this ViewPropertyAnimator will have its
|
WithStartAction(IRunnable) |
Specifies an action to take place when the next animation runs. |
X(Single) |
This method will cause the View's |
XBy(Single) |
This method will cause the View's |
Y(Single) |
This method will cause the View's |
YBy(Single) |
This method will cause the View's |
Z(Single) |
This method will cause the View's |
ZBy(Single) |
This method will cause the View's |
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) |