Home | History | Annotate | Download | only in view

Lines Matching refs:animator

19 import android.animation.Animator;
41 * details of configuring the underlying Animator class and starting it.</p>
57 * The duration of the underlying Animator object. By default, we don't set the duration
58 * on the Animator and just use its default duration. If the duration is ever set on this
59 * Animator, then we use the duration that it was set to.
65 * the duration on the underlying Animator, but instead just use its default duration.
70 * The startDelay of the underlying Animator object. By default, we don't set the startDelay
71 * on the Animator and just use its default startDelay. If the startDelay is ever set on this
72 * Animator, then we use the startDelay that it was set to.
78 * the startDelay on the underlying Animator, but instead just use its default startDelay.
83 * The interpolator of the underlying Animator object. By default, we don't set the interpolator
84 * on the Animator and just use its default interpolator. If the interpolator is ever set on
85 * this Animator, then we use the interpolator that it was set to.
91 * the interpolator on the underlying Animator, but instead just use its default interpolator.
98 private Animator.AnimatorListener mListener = null;
101 * This listener is the mechanism by which the underlying Animator causes changes to the
109 * request several animations prior to actually starting the underlying animator. This
110 * enables us to run one single animator to handle several properties in parallel. Each
113 * on that list are added to the list of properties associated with that animator.
142 * together works by posting this Runnable to start the underlying Animator. Every time
145 * underlying animator) after the caller is done setting the properties that should be
196 * This list tracks the list of properties being animated by any particular animator.
197 * In most situations, there would only ever be one animator running at a time. But it is
201 * animator handling the animation. On every update event for an Animator, we ask the
204 private HashMap<Animator, PropertyBundle> mAnimatorMap =
205 new HashMap<Animator, PropertyBundle>();
206 private HashMap<Animator, Runnable> mAnimatorSetupMap;
207 private HashMap<Animator, Runnable> mAnimatorCleanupMap;
208 private HashMap<Animator, Runnable> mAnimatorOnStartMap;
209 private HashMap<Animator, Runnable> mAnimatorOnEndMap;
240 * Sets the duration for the underlying animator that animates the requested properties.
241 * By default, the animator uses the default value for ValueAnimator. Calling this method
259 * object, that value is returned. Otherwise, the default value of the underlying Animator
277 * object, that value is returned. Otherwise, the default value of the underlying Animator
294 * Sets the startDelay for the underlying animator that animates the requested properties.
295 * By default, the animator uses the default value for ValueAnimator. Calling this method
312 * Sets the interpolator for the underlying animator that animates the requested properties.
313 * By default, the animator uses the default interpolator for ValueAnimator. Calling this method
341 public ViewPropertyAnimator setListener(Animator.AnimatorListener listener) {
363 HashMap<Animator, PropertyBundle> mAnimatorMapCopy =
364 (HashMap<Animator, PropertyBundle>)mAnimatorMap.clone();
365 Set<Animator> animatorSet = mAnimatorMapCopy.keySet();
366 for (Animator runningAnim : animatorSet) {
670 mAnimatorSetupMap = new HashMap<Animator, Runnable>();
673 mAnimatorCleanupMap = new HashMap<Animator, Runnable>();
693 mAnimatorOnStartMap = new HashMap<Animator, Runnable>();
722 mAnimatorOnEndMap = new HashMap<Animator, Runnable>();
728 * Starts the underlying Animator for a set of properties. We use a single animator that
734 ValueAnimator animator = ValueAnimator.ofFloat(1.0f);
744 mAnimatorMap.put(animator, new PropertyBundle(propertyMask, nameValueList));
746 mAnimatorSetupMap.put(animator, mPendingSetupAction);
750 mAnimatorCleanupMap.put(animator, mPendingCleanupAction);
754 mAnimatorOnStartMap.put(animator, mPendingOnStartAction);
758 mAnimatorOnEndMap.put(animator, mPendingOnEndAction);
761 animator.addUpdateListener(mAnimatorEventListener);
762 animator.addListener(mAnimatorEventListener);
764 animator.setStartDelay(mStartDelay);
767 animator.setDuration(mDuration);
770 animator.setInterpolator(mInterpolator);
772 animator.start();
779 * pending animations, awaiting the eventual start() of the underlying animator. A
781 * (which enables us to end up starting just one animator for all of the properties
817 Animator animatorToCancel = null;
818 Set<Animator> animatorSet = mAnimatorMap.keySet();
819 for (Animator runningAnim : animatorSet) {
933 * Utility class that handles the various Animator events. The only ones we care
934 * about are the end event (which we use to clean up the animator map when an animator
939 implements Animator.AnimatorListener, ValueAnimator.AnimatorUpdateListener {
941 public void onAnimationStart(Animator animation) {
962 public void onAnimationCancel(Animator animation) {
972 public void onAnimationRepeat(Animator animation) {
979 public void onAnimationEnd(Animator animation) {
1005 * @param animation The animator associated with the properties that need to be
1006 * set. This animator holds the animation fraction which we will use to calculate