Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1039c6f authored by Chet Haase's avatar Chet Haase Committed by Android (Google) Code Review
Browse files

Merge "Add resource attributes for Keyframes and PropertyValuesHolders"

parents f28f5cec d430753c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -593,6 +593,7 @@ package android {
    field public static final int format = 16843013; // 0x1010105
    field public static final int format12Hour = 16843722; // 0x10103ca
    field public static final int format24Hour = 16843723; // 0x10103cb
    field public static final int fraction = 16843992; // 0x10104d8
    field public static final int fragment = 16843491; // 0x10102e3
    field public static final int fragmentAllowEnterTransitionOverlap = 16843976; // 0x10104c8
    field public static final int fragmentAllowReturnTransitionOverlap = 16843977; // 0x10104c9
+368 −31

File changed.

Preview size limit exceeded, changes collapsed.

+12 −0
Original line number Diff line number Diff line
@@ -972,6 +972,18 @@ public final class AnimatorSet extends Animator {
        }
    }

    @Override
    public String toString() {
        String returnVal = "AnimatorSet@" + Integer.toHexString(hashCode()) + "{";
        boolean prevNeedsSort = mNeedsSort;
        sortNodes();
        mNeedsSort = prevNeedsSort;
        for (Node node : mSortedNodes) {
            returnVal += "\n    " + node.animation.toString();
        }
        return returnVal + "\n}";
    }

    /**
     * Dependency holds information about the node that some other node is
     * dependent upon and the nature of that dependency.
+21 −0
Original line number Diff line number Diff line
@@ -33,6 +33,27 @@ import java.util.ArrayList;
 * are then determined internally and the animation will call these functions as necessary to
 * animate the property.
 *
 * <p>Animators can be created from either code or resource files, as shown here:</p>
 *
 * {@sample development/samples/ApiDemos/res/anim/object_animator.xml ObjectAnimatorResources}
 *
 * <p>When using resource files, it is possible to use {@link PropertyValuesHolder} and
 * {@link Keyframe} to create more complex animations. Using PropertyValuesHolders
 * allows animators to animate several properties in parallel, as shown in this sample:</p>
 *
 * {@sample development/samples/ApiDemos/res/anim/object_animator_pvh.xml
 * PropertyValuesHolderResources}
 *
 * <p>Using Keyframes allows animations to follow more complex paths from the start
 * to the end values. Note that you can specify explicit fractional values (from 0 to 1) for
 * each keyframe to determine when, in the overall duration, the animation should arrive at that
 * value. Alternatively, you can leave the fractions off and the keyframes will be equally
 * distributed within the total duration. Also, a keyframe with no value will derive its value
 * from the target object when the animator starts, just like animators with only one
 * value specified.</p>
 *
 * {@sample development/samples/ApiDemos/res/anim/object_animator_pvh_kf.xml KeyframeResources}
 *
 * <div class="special reference">
 * <h3>Developer Guides</h3>
 * <p>For more information about animating with {@code ObjectAnimator}, read the
+16 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.animation;

import android.content.res.ConfigurationBoundResourceCache;
import android.os.Debug;
import android.os.Looper;
import android.os.Trace;
import android.util.AndroidRuntimeException;
@@ -40,6 +41,21 @@ import java.util.HashMap;
 * out of an animation. This behavior can be changed by calling
 * {@link ValueAnimator#setInterpolator(TimeInterpolator)}.</p>
 *
 * <p>Animators can be created from either code or resource files. Here is an example
 * of a ValueAnimator resource file:</p>
 *
 * {@sample development/samples/ApiDemos/res/anim/animator.xml ValueAnimatorResources}
 *
 * <p>It is also possible to use a combination of {@link PropertyValuesHolder} and
 * {@link Keyframe} resource tags to create a multi-step animation.
 * Note that you can specify explicit fractional values (from 0 to 1) for
 * each keyframe to determine when, in the overall duration, the animation should arrive at that
 * value. Alternatively, you can leave the fractions off and the keyframes will be equally
 * distributed within the total duration:</p>
 *
 * {@sample development/samples/ApiDemos/res/anim/value_animator_pvh_kf.xml
 * ValueAnimatorKeyframeResources}
 *
 * <div class="special reference">
 * <h3>Developer Guides</h3>
 * <p>For more information about animating with {@code ValueAnimator}, read the
Loading