Merge "API Review: Drawable" into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a2f47be64b
@@ -12255,7 +12255,6 @@ package android.graphics.drawable {
|
|||||||
method public android.graphics.drawable.Drawable getCurrent();
|
method public android.graphics.drawable.Drawable getCurrent();
|
||||||
method public android.graphics.Rect getDirtyBounds();
|
method public android.graphics.Rect getDirtyBounds();
|
||||||
method public boolean getDither();
|
method public boolean getDither();
|
||||||
method public boolean getFilterBitmap();
|
|
||||||
method public void getHotspotBounds(android.graphics.Rect);
|
method public void getHotspotBounds(android.graphics.Rect);
|
||||||
method public int getIntrinsicHeight();
|
method public int getIntrinsicHeight();
|
||||||
method public int getIntrinsicWidth();
|
method public int getIntrinsicWidth();
|
||||||
@@ -12272,12 +12271,13 @@ package android.graphics.drawable {
|
|||||||
method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
|
method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
|
||||||
method public void invalidateSelf();
|
method public void invalidateSelf();
|
||||||
method public boolean isAutoMirrored();
|
method public boolean isAutoMirrored();
|
||||||
|
method public boolean isFilterBitmap();
|
||||||
method public boolean isStateful();
|
method public boolean isStateful();
|
||||||
method public final boolean isVisible();
|
method public final boolean isVisible();
|
||||||
method public void jumpToCurrentState();
|
method public void jumpToCurrentState();
|
||||||
method public android.graphics.drawable.Drawable mutate();
|
method public android.graphics.drawable.Drawable mutate();
|
||||||
method protected void onBoundsChange(android.graphics.Rect);
|
method protected void onBoundsChange(android.graphics.Rect);
|
||||||
method public boolean onLayoutDirectionChange(int);
|
method public boolean onLayoutDirectionChanged(int);
|
||||||
method protected boolean onLevelChange(int);
|
method protected boolean onLevelChange(int);
|
||||||
method protected boolean onStateChange(int[]);
|
method protected boolean onStateChange(int[]);
|
||||||
method public static int resolveOpacity(int, int);
|
method public static int resolveOpacity(int, int);
|
||||||
|
|||||||
@@ -12562,7 +12562,6 @@ package android.graphics.drawable {
|
|||||||
method public android.graphics.drawable.Drawable getCurrent();
|
method public android.graphics.drawable.Drawable getCurrent();
|
||||||
method public android.graphics.Rect getDirtyBounds();
|
method public android.graphics.Rect getDirtyBounds();
|
||||||
method public boolean getDither();
|
method public boolean getDither();
|
||||||
method public boolean getFilterBitmap();
|
|
||||||
method public void getHotspotBounds(android.graphics.Rect);
|
method public void getHotspotBounds(android.graphics.Rect);
|
||||||
method public int getIntrinsicHeight();
|
method public int getIntrinsicHeight();
|
||||||
method public int getIntrinsicWidth();
|
method public int getIntrinsicWidth();
|
||||||
@@ -12579,12 +12578,13 @@ package android.graphics.drawable {
|
|||||||
method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
|
method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
|
||||||
method public void invalidateSelf();
|
method public void invalidateSelf();
|
||||||
method public boolean isAutoMirrored();
|
method public boolean isAutoMirrored();
|
||||||
|
method public boolean isFilterBitmap();
|
||||||
method public boolean isStateful();
|
method public boolean isStateful();
|
||||||
method public final boolean isVisible();
|
method public final boolean isVisible();
|
||||||
method public void jumpToCurrentState();
|
method public void jumpToCurrentState();
|
||||||
method public android.graphics.drawable.Drawable mutate();
|
method public android.graphics.drawable.Drawable mutate();
|
||||||
method protected void onBoundsChange(android.graphics.Rect);
|
method protected void onBoundsChange(android.graphics.Rect);
|
||||||
method public boolean onLayoutDirectionChange(int);
|
method public boolean onLayoutDirectionChanged(int);
|
||||||
method protected boolean onLevelChange(int);
|
method protected boolean onLevelChange(int);
|
||||||
method protected boolean onStateChange(int[]);
|
method protected boolean onStateChange(int[]);
|
||||||
method public static int resolveOpacity(int, int);
|
method public static int resolveOpacity(int, int);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import android.graphics.Rect;
|
|||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
import com.android.internal.R;
|
import com.android.internal.R;
|
||||||
|
|
||||||
@@ -200,7 +201,7 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onLayoutDirectionChange(int layoutDirection) {
|
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||||
return mAnimatedVectorState.mVectorDrawable.setLayoutDirection(layoutDirection);
|
return mAnimatedVectorState.mVectorDrawable.setLayoutDirection(layoutDirection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class Drawable {
|
|||||||
public void setDither(boolean dither) {}
|
public void setDither(boolean dither) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return whether this drawable dither its colors
|
* @return whether this drawable dithers its colors
|
||||||
* @see #setDither(boolean)
|
* @see #setDither(boolean)
|
||||||
*/
|
*/
|
||||||
public boolean getDither() {
|
public boolean getDither() {
|
||||||
@@ -295,7 +295,7 @@ public abstract class Drawable {
|
|||||||
* @return whether this drawable filters its bitmap
|
* @return whether this drawable filters its bitmap
|
||||||
* @see #setFilterBitmap(boolean)
|
* @see #setFilterBitmap(boolean)
|
||||||
*/
|
*/
|
||||||
public boolean getFilterBitmap() {
|
public boolean isFilterBitmap() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,7 +444,7 @@ public abstract class Drawable {
|
|||||||
public final boolean setLayoutDirection(@View.ResolvedLayoutDir int layoutDirection) {
|
public final boolean setLayoutDirection(@View.ResolvedLayoutDir int layoutDirection) {
|
||||||
if (mLayoutDirection != layoutDirection) {
|
if (mLayoutDirection != layoutDirection) {
|
||||||
mLayoutDirection = layoutDirection;
|
mLayoutDirection = layoutDirection;
|
||||||
return onLayoutDirectionChange(layoutDirection);
|
return onLayoutDirectionChanged(layoutDirection);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -457,7 +457,7 @@ public abstract class Drawable {
|
|||||||
* the drawable to change and it needs to be re-drawn
|
* the drawable to change and it needs to be re-drawn
|
||||||
* @see #setLayoutDirection(int)
|
* @see #setLayoutDirection(int)
|
||||||
*/
|
*/
|
||||||
public boolean onLayoutDirectionChange(@View.ResolvedLayoutDir int layoutDirection) {
|
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import android.graphics.PorterDuff.Mode;
|
|||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.util.LayoutDirection;
|
import android.util.LayoutDirection;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
@@ -337,7 +338,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onLayoutDirectionChange(int layoutDirection) {
|
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||||
// Let the container handle setting its own layout direction. Otherwise,
|
// Let the container handle setting its own layout direction. Otherwise,
|
||||||
// we're accessing potentially unused states.
|
// we're accessing potentially unused states.
|
||||||
return mDrawableContainerState.setLayoutDirection(layoutDirection, getCurrentIndex());
|
return mDrawableContainerState.setLayoutDirection(layoutDirection, getCurrentIndex());
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ public abstract class DrawableWrapper extends Drawable implements Drawable.Callb
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onLayoutDirectionChange(@View.ResolvedLayoutDir int layoutDirection) {
|
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||||
return mDrawable != null && mDrawable.setLayoutDirection(layoutDirection);
|
return mDrawable != null && mDrawable.setLayoutDirection(layoutDirection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1662,7 +1662,7 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onLayoutDirectionChange(int layoutDirection) {
|
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
|
||||||
final ChildDrawable[] array = mLayerState.mChildren;
|
final ChildDrawable[] array = mLayerState.mChildren;
|
||||||
|
|||||||
Reference in New Issue
Block a user