/// <summary>Stops all animations for the given property and removes it from the list. /// </summary> /// <remarks>Stops all animations for the given property and removes it from the list. /// </remarks> /// <param name="property"></param> public virtual void removeAnimationFor(string property) { java.util.ArrayList <android.animation.ObjectAnimator> removalList = (java.util.ArrayList <android.animation.ObjectAnimator>)mAnimators.clone(); foreach (android.animation.ObjectAnimator currentAnim in Sharpen.IterableProxy.Create (removalList)) { if (property.Equals(currentAnim.getPropertyName())) { currentAnim.cancel(); } } }
/// <summary>Notifies registered listeners that the drawing pass is about to start.</summary> /// <remarks> /// Notifies registered listeners that the drawing pass is about to start. If a /// listener returns true, then the drawing pass is canceled and rescheduled. This can /// be called manually if you are forcing the drawing on a View or a hierarchy of Views /// that are not attached to a Window or in the GONE state. /// </remarks> /// <returns>True if the current draw should be canceled and resceduled, false otherwise. /// </returns> public bool dispatchOnPreDraw() { // NOTE: we *must* clone the listener list to perform the dispatching. // The clone is a safe guard against listeners that // could mutate the list by calling the various add/remove methods. This prevents // the array from being modified while we process it. bool cancelDraw = false; if (mOnPreDrawListeners != null && mOnPreDrawListeners.size() > 0) { java.util.ArrayList <android.view.ViewTreeObserver.OnPreDrawListener> listeners = (java.util.ArrayList <android.view.ViewTreeObserver.OnPreDrawListener>)mOnPreDrawListeners .clone(); int numListeners = listeners.size(); { for (int i = 0; i < numListeners; ++i) { cancelDraw |= !(listeners.get(i).onPreDraw()); } } } return(cancelDraw); }