diff options
| author | 2014-08-15 18:33:40 +0000 | |
|---|---|---|
| committer | 2014-08-15 08:11:59 +0000 | |
| commit | a4888fbac9ff01242c8fec0b29c27770ff703879 (patch) | |
| tree | 8e440d24bd35531a7b066d3961fad4e970b963c2 | |
| parent | 3571839cf0f3b37a748bad81be0e9eff9cb05617 (diff) | |
| parent | 6beeb75723cec42603b47664bce794a2b97d7bac (diff) | |
Merge "Minor doc fixes from API council recommendations." into lmp-dev
4 files changed, 10 insertions, 8 deletions
diff --git a/api/current.txt b/api/current.txt index 2a3c08600508..8278cafde7be 100644 --- a/api/current.txt +++ b/api/current.txt @@ -11654,7 +11654,7 @@ package android.graphics.drawable { public class AnimatedStateListDrawable extends android.graphics.drawable.StateListDrawable { ctor public AnimatedStateListDrawable(); method public void addState(int[], android.graphics.drawable.Drawable, int); - method public void addTransition(int, int, android.graphics.drawable.Drawable, boolean); + method public void addTransition(int, int, T, boolean); } public class AnimatedVectorDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Animatable { diff --git a/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java b/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java index fc38e8a34dbf..14aa570aa828 100644 --- a/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java @@ -119,11 +119,11 @@ public class AnimatedStateListDrawable extends StateListDrawable { * * @param fromId Unique identifier of the starting keyframe * @param toId Unique identifier of the ending keyframe - * @param transition An animatable drawable to use as a transition, may not be null + * @param transition An {@link Animatable} drawable to use as a transition, may not be null * @param reversible Whether the transition can be reversed */ - public void addTransition(int fromId, int toId, @NonNull Drawable transition, - boolean reversible) { + public <T extends Drawable & Animatable> void addTransition(int fromId, int toId, + @NonNull T transition, boolean reversible) { if (transition == null) { throw new IllegalArgumentException("Transition drawable must not be null"); } diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java index 766e681c9207..9ac6927ca6aa 100644 --- a/graphics/java/android/graphics/drawable/VectorDrawable.java +++ b/graphics/java/android/graphics/drawable/VectorDrawable.java @@ -49,7 +49,7 @@ import java.util.ArrayList; import java.util.Stack; /** - * This lets you create a drawable based on an XML vector graphic It can be + * This lets you create a drawable based on an XML vector graphic. It can be * defined in an XML file with the <code><vector></code> element. * <p/> * The vector drawable has the following elements: diff --git a/graphics/java/android/graphics/drawable/shapes/Shape.java b/graphics/java/android/graphics/drawable/shapes/Shape.java index 589fbaa0a88e..eab86662b18e 100644 --- a/graphics/java/android/graphics/drawable/shapes/Shape.java +++ b/graphics/java/android/graphics/drawable/shapes/Shape.java @@ -16,6 +16,7 @@ package android.graphics.drawable.shapes; +import android.annotation.NonNull; import android.graphics.Canvas; import android.graphics.Outline; import android.graphics.Paint; @@ -93,11 +94,12 @@ public abstract class Shape implements Cloneable { protected void onResize(float width, float height) {} /** - * Compute the Outline of the shape. + * Compute the Outline of the shape and return it in the supplied Outline + * parameter. The default implementation does nothing and {@code outline} is not changed. * - * The default implementation does not supply an outline. + * @param outline The Outline to be populated with the result. Should not be null. */ - public void getOutline(Outline outline) {} + public void getOutline(@NonNull Outline outline) {} @Override public Shape clone() throws CloneNotSupportedException { |