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

Commit 78c481c1 authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am 4380f954: Merge "Minor doc fixes for animation- and view-related things" into jb-dev

* commit '4380f954':
  Minor doc fixes for animation- and view-related things
parents d92c5c03 4380f954
Loading
Loading
Loading
Loading
+23 −4
Original line number Original line Diff line number Diff line
@@ -537,9 +537,32 @@ import java.util.concurrent.CopyOnWriteArrayList;
 * themselves rather than by putting them in a separate structure.
 * themselves rather than by putting them in a separate structure.
 * </p>
 * </p>
 *
 *
 * <a name="Properties"></a>
 * <h3>Properties</h3>
 * <p>
 * The View class exposes an {@link #ALPHA} property, as well as several transform-related
 * properties, such as {@link #TRANSLATION_X} and {@link #TRANSLATION_Y}. These properties are
 * available both in the {@link Property} form as well as in similarly-named setter/getter
 * methods (such as {@link #setAlpha(float)} for {@link #ALPHA}). These properties can
 * be used to set persistent state associated with these rendering-related properties on the view.
 * The properties and methods can also be used in conjunction with
 * {@link android.animation.Animator Animator}-based animations, described more in the
 * <a href="#Animation">Animation</a> section.
 * </p>
 *
 * <a name="Animation"></a>
 * <a name="Animation"></a>
 * <h3>Animation</h3>
 * <h3>Animation</h3>
 * <p>
 * <p>
 * Starting with Android 3.0, the preferred way of animating views is to use the
 * {@link android.animation} package APIs. These {@link android.animation.Animator Animator}-based
 * classes change actual properties of the View object, such as {@link #setAlpha(float) alpha} and
 * {@link #setTranslationX(float) translationX}. This behavior is contrasted to that of the pre-3.0
 * {@link android.view.animation.Animation Animation}-based classes, which instead animate only
 * how the view is drawn on the display. In particular, the {@link ViewPropertyAnimator} class
 * makes animating these View properties particularly easy and efficient.
 * </p>
 * <p>
 * Alternatively, you can use the pre-3.0 animation classes to animate how Views are rendered.
 * You can attach an {@link Animation} object to a view using
 * You can attach an {@link Animation} object to a view using
 * {@link #setAnimation(Animation)} or
 * {@link #setAnimation(Animation)} or
 * {@link #startAnimation(Animation)}. The animation can alter the scale,
 * {@link #startAnimation(Animation)}. The animation can alter the scale,
@@ -548,10 +571,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
 * subtree rooted by that node. When an animation is started, the framework will
 * subtree rooted by that node. When an animation is started, the framework will
 * take care of redrawing the appropriate views until the animation completes.
 * take care of redrawing the appropriate views until the animation completes.
 * </p>
 * </p>
 * <p>
 * Starting with Android 3.0, the preferred way of animating views is to use the
 * {@link android.animation} package APIs.
 * </p>
 *
 *
 * <a name="Security"></a>
 * <a name="Security"></a>
 * <h3>Security</h3>
 * <h3>Security</h3>
+14 −8
Original line number Original line Diff line number Diff line
@@ -624,14 +624,20 @@ public class ViewPropertyAnimator {
    /**
    /**
     * The View associated with this ViewPropertyAnimator will have its
     * The View associated with this ViewPropertyAnimator will have its
     * {@link View#setLayerType(int, android.graphics.Paint) layer type} set to
     * {@link View#setLayerType(int, android.graphics.Paint) layer type} set to
     * {@link View#LAYER_TYPE_HARDWARE} for the duration of the next animation. This state
     * {@link View#LAYER_TYPE_HARDWARE} for the duration of the next animation.
     * is not persistent, either on the View or on this ViewPropertyAnimator: the layer type
     * As stated in the documentation for {@link View#LAYER_TYPE_HARDWARE},
     * of the View will be restored when the animation ends to what it was when this method was
     * the actual type of layer used internally depends on the runtime situation of the
     * called, and this setting on ViewPropertyAnimator is only valid for the next animation.
     * view. If the activity and this view are hardware-accelerated, then the layer will be
     * Note that calling this method and then independently setting the layer type of the View
     * accelerated as well. If the activity or the view is not accelerated, then the layer will
     * (by a direct call to {@link View#setLayerType(int, android.graphics.Paint)}) will result
     * effectively be the same as {@link View#LAYER_TYPE_SOFTWARE}.
     * in some inconsistency, including having the layer type restored to its pre-withLayer()
     *
     * value when the animation ends.
     * <p>This state is not persistent, either on the View or on this ViewPropertyAnimator: the
     * layer type of the View will be restored when the animation ends to what it was when this
     * method was called, and this setting on ViewPropertyAnimator is only valid for the next
     * animation. Note that calling this method and then independently setting the layer type of
     * the View (by a direct call to {@link View#setLayerType(int, android.graphics.Paint)}) will
     * result in some inconsistency, including having the layer type restored to its pre-withLayer()
     * value when the animation ends.</p>
     *
     *
     * @see View#setLayerType(int, android.graphics.Paint)
     * @see View#setLayerType(int, android.graphics.Paint)
     * @return This object, allowing calls to methods in this class to be chained.
     * @return This object, allowing calls to methods in this class to be chained.