Home | History | Annotate | Download | only in animation

Lines Matching defs:AnimatorSet

38  * <p>There are two different approaches to adding animations to a <code>AnimatorSet</code>:
39 * either the {@link AnimatorSet#playTogether(Animator[]) playTogether()} or
40 * {@link AnimatorSet#playSequentially(Animator[]) playSequentially()} methods can be called to add
41 * a set of animations all at once, or the {@link AnimatorSet#play(Animator)} can be
42 * used in conjunction with methods in the {@link AnimatorSet.Builder Builder}
46 * <p>It is possible to set up a <code>AnimatorSet</code> with circular dependencies between
55 * <p>For more information about animating with {@code AnimatorSet}, read the
60 public final class AnimatorSet extends Animator implements AnimationHandler.AnimationFrameCallback {
62 private static final String TAG = "AnimatorSet";
72 * cancel or end when cancel() or end() is called on this AnimatorSet
90 * Set of all nodes created for this AnimatorSet. This list is used upon
97 * Tracks whether any change has been made to the AnimatorSet, which is then used to
103 * Indicates whether an AnimatorSet has been start()'d, whether or
121 // simply means that there is no duration set on the AnimatorSet. When a real duration is
126 // was set on this AnimatorSet, so it should not be passed down to the children.
168 // passively wait for an AnimatorSet to pulse it.
197 public AnimatorSet() {
221 * Sets up this AnimatorSet to play all of the supplied animations at the same time.
241 * Sets up this AnimatorSet to play all of the supplied animations at the same time.
259 * Sets up this AnimatorSet to play each of the supplied animations when the
277 * Sets up this AnimatorSet to play each of the supplied animations when the
296 * AnimatorSet. This is a copy of the internal list; modifications to the returned list
297 * will not affect the AnimatorSet, although changes to the underlying Animator objects
298 * will affect those objects being managed by the AnimatorSet.
300 * @return ArrayList<Animator> The list of child animations of this AnimatorSet.
316 * of this AnimatorSet that take targets ({@link ObjectAnimator} and
317 * AnimatorSet).
327 if (animation instanceof AnimatorSet) {
328 ((AnimatorSet)animation).setTarget(target);
350 * of this AnimatorSet. The default value is null, which means that no interpolator
351 * is set on this AnimatorSet. Setting the interpolator to any non-null value
355 * @param interpolator the interpolator to be used by each child animation of this AnimatorSet
372 * calling <code>play(a1).with(a2)</code> sets up the AnimatorSet to play
374 * <code>play(a1).before(a2)</code> sets up the AnimatorSet to play
376 * <code>play(a1).after(a2)</code> sets up the AnimatorSet to play
391 * @return Builder The object that constructs the AnimatorSet based on the dependencies
405 * <p>Note that canceling a <code>AnimatorSet</code> also cancels all of the animations that it
460 * <p>Note that ending a <code>AnimatorSet</code> also ends all of the animations that it is
496 // AnimatorSet's lifecycle (i.e. not a recommended approach).
519 * Returns true if any of the child animations of this AnimatorSet have been started and have
520 * not yet ended. Child animations will not be started until the AnimatorSet has gone past
523 * @return Whether this AnimatorSet has gone past the initial delay, and at least one child
591 * Gets the length of each of the child animations of this AnimatorSet. This value may
592 * be less than 0, which indicates that no duration has been set on this AnimatorSet
596 * animations of this AnimatorSet.
604 * Sets the length of each of the current child animations of this AnimatorSet. By default,
605 * each child animation will use its own duration. If the duration is set on the AnimatorSet,
609 * animations of this AnimatorSet.
612 public AnimatorSet setDuration(long duration) {
617 // Just record the value for now - it will be used later when the AnimatorSet starts
673 * <p>Starting this <code>AnimatorSet</code> will, in turn, start the animations for which
677 * <b>Note:</b> Manipulating AnimatorSet's lifecycle in the child animators' listener callbacks
678 * will lead to undefined behaviors. Also, AnimatorSet will ignore any seeking in the child
721 throw new UnsupportedOperationException("Cannot reverse infinite AnimatorSet");
741 // In the case of empty AnimatorSet, or 0 duration scale, we will trigger the
748 private static boolean isEmptySet(AnimatorSet set) {
754 if (!(anim instanceof AnimatorSet)) {
755 // Contains non-AnimatorSet, not empty.
758 if (!isEmptySet((AnimatorSet) anim)) {
768 // If the duration was set on this AnimatorSet, pass it along to all child animations
772 // TODO: don't set the duration of the timing-only nodes created by AnimatorSet to
830 throw new UnsupportedOperationException("Cannot reverse AnimatorSet with infinite"
908 * the end of the start delay of the AnimatorSet in a forward playing direction.
915 + " AnimatorSet");
929 + " should not be set when AnimatorSet is not started.");
1114 // the child animator is being manipulated outside of the AnimatorSet), we
1136 // the child animator is being manipulated outside of the AnimatorSet), we
1237 // This is to work around the issue in b/34736819, as the old behavior in AnimatorSet had
1319 public AnimatorSet clone() {
1320 final AnimatorSet anim = (AnimatorSet) super.clone();
1323 * AnimatorSet, because it will copy references that need to be recreated and state
1357 // One problem is that the old node dependencies point to nodes in the old AnimatorSet.
1400 * AnimatorSet is only reversible when the set contains no sequential animation, and no child
1410 * Plays the AnimatorSet in reverse. If the animation has been seeked to a specific play time
1416 * Note: reverse is not supported for infinite AnimatorSet.
1425 String returnVal = "AnimatorSet@" + Integer.toHexString(hashCode()) + "{";
1635 // Add AnimatorSet's start delay node to the beginning
1684 Log.w(TAG, "Cycle found in AnimatorSet: " + this);
1723 * TODO: For animatorSet defined in XML, we can use a flag to indicate what the play order
1725 * dynamically. Note that when AnimatorSet is empty this method returns true.
1769 * is used by AnimatorSet to check, as each animation ends, whether all child animations
1770 * are mEnded and it's time to send out an end event for the entire AnimatorSet.
1963 * <code>AnimatorSet</code> along with the relationships between the various animations. The
1965 * AnimatorSet#play(Animator) play()} method of <code>AnimatorSet</code> is to make it possible
1967 * use the {@link AnimatorSet#playTogether(Animator[]) playTogether()} and {@link
1968 * AnimatorSet#playSequentially(Animator[]) playSequentially()} methods if these suit the need,
1969 * but it might be easier in some situations to express the AnimatorSet of animations in pairs.
1972 * internally via a call to {@link AnimatorSet#play(Animator)}.</p>
1974 * <p>For example, this sets up a AnimatorSet to play anim1 and anim2 at the same time, anim3 to
1977 * AnimatorSet s = new AnimatorSet();
1990 * {@link AnimatorSet#play(Animator)} method that is the dependency in any of the successive
1995 * AnimatorSet s = new AnimatorSet();
2001 * AnimatorSet s = new AnimatorSet();
2017 * of AnimatorSet and passed into the constructor of Builder.
2022 * package-private constructor. Builders are only constructed by AnimatorSet, when the
2035 * {@link AnimatorSet
2038 * {@link AnimatorSet#play(Animator)} method starts.
2048 * {@link AnimatorSet#play(Animator)} call that created this <code>Builder</code> object
2052 * {@link AnimatorSet#play(Animator)} method ends.
2062 * {@link AnimatorSet#play(Animator)} call that created this <code>Builder</code> object
2066 * {@link AnimatorSet#play(Animator)} method to play.
2076 * {@link AnimatorSet#play(Animator)} call that created this <code>Builder</code> object