Android.Views.ViewPropertyAnimator.WithEndAction Method
Specifies an action to take place when the next animation ends.

Syntax

[Android.Runtime.Register("withEndAction", "(Ljava/lang/Runnable;)Landroid/view/ViewPropertyAnimator;", "GetWithEndAction_Ljava_lang_Runnable_Handler")]
public virtual ViewPropertyAnimator WithEndAction (Java.Lang.IRunnable runnable)

Parameters

runnable
The action to run when the next animation ends.

Returns

Documentation for this section has not yet been entered.

Remarks

Specifies an action to take place when the next animation ends. The action is only run if the animation ends normally; if the ViewPropertyAnimator is canceled during that animation, the runnable will not run. This method, along with ViewPropertyAnimator.WithStartAction(Java.Lang.IRunnable), is intended to help facilitate choreographing ViewPropertyAnimator animations with other animations or actions in the application.

java Example

     Runnable endAction = new Runnable() {
         public void run() {
             view.animate().x(0);
         }
     };
     view.animate().x(200).withEndAction(endAction);
 

For example, the following code animates a view to x=200 and then back to 0:

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16