summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-05-27 13:26:41 -0700
committerAlan Viverette <alanv@google.com>2015-05-27 13:26:41 -0700
commitdfa4646eca54511a28f2c61e1f4b9c697e05a913 (patch)
treea2bfa9fa8bc4e9151509f76b6d083208514cca88 /graphics
parentbcbe9ba0f939803dfa9b48519e113dc1c32268dc (diff)
downloadframeworks_base-dfa4646eca54511a28f2c61e1f4b9c697e05a913.zip
frameworks_base-dfa4646eca54511a28f2c61e1f4b9c697e05a913.tar.gz
frameworks_base-dfa4646eca54511a28f2c61e1f4b9c697e05a913.tar.bz2
API Review: Drawable
Renames boolean getters to isZzz(), callback from onChange to onChanged. Bug: 21342040 Change-Id: I9700d645453354b608fd97a832359211d828b52f
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java3
-rw-r--r--graphics/java/android/graphics/drawable/Drawable.java8
-rw-r--r--graphics/java/android/graphics/drawable/DrawableContainer.java3
-rw-r--r--graphics/java/android/graphics/drawable/DrawableWrapper.java2
-rw-r--r--graphics/java/android/graphics/drawable/LayerDrawable.java2
5 files changed, 10 insertions, 8 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
index 28c26ff..b8f64a4 100644
--- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
@@ -31,6 +31,7 @@ import android.graphics.Rect;
import android.util.ArrayMap;
import android.util.AttributeSet;
import android.util.Log;
+import android.view.View;
import com.android.internal.R;
@@ -200,7 +201,7 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
}
@Override
- public boolean onLayoutDirectionChange(int layoutDirection) {
+ public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
return mAnimatedVectorState.mVectorDrawable.setLayoutDirection(layoutDirection);
}
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java
index 22ff3e7..e8e4664 100644
--- a/graphics/java/android/graphics/drawable/Drawable.java
+++ b/graphics/java/android/graphics/drawable/Drawable.java
@@ -276,7 +276,7 @@ public abstract class Drawable {
public void setDither(boolean dither) {}
/**
- * @return whether this drawable dither its colors
+ * @return whether this drawable dithers its colors
* @see #setDither(boolean)
*/
public boolean getDither() {
@@ -295,7 +295,7 @@ public abstract class Drawable {
* @return whether this drawable filters its bitmap
* @see #setFilterBitmap(boolean)
*/
- public boolean getFilterBitmap() {
+ public boolean isFilterBitmap() {
return false;
}
@@ -444,7 +444,7 @@ public abstract class Drawable {
public final boolean setLayoutDirection(@View.ResolvedLayoutDir int layoutDirection) {
if (mLayoutDirection != layoutDirection) {
mLayoutDirection = layoutDirection;
- return onLayoutDirectionChange(layoutDirection);
+ return onLayoutDirectionChanged(layoutDirection);
}
return false;
}
@@ -457,7 +457,7 @@ public abstract class Drawable {
* the drawable to change and it needs to be re-drawn
* @see #setLayoutDirection(int)
*/
- public boolean onLayoutDirectionChange(@View.ResolvedLayoutDir int layoutDirection) {
+ public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
return false;
}
diff --git a/graphics/java/android/graphics/drawable/DrawableContainer.java b/graphics/java/android/graphics/drawable/DrawableContainer.java
index 4a06805..8b801c3 100644
--- a/graphics/java/android/graphics/drawable/DrawableContainer.java
+++ b/graphics/java/android/graphics/drawable/DrawableContainer.java
@@ -31,6 +31,7 @@ import android.graphics.PorterDuff.Mode;
import android.os.SystemClock;
import android.util.LayoutDirection;
import android.util.SparseArray;
+import android.view.View;
import java.util.Collection;
@@ -337,7 +338,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
}
@Override
- public boolean onLayoutDirectionChange(int layoutDirection) {
+ public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
// Let the container handle setting its own layout direction. Otherwise,
// we're accessing potentially unused states.
return mDrawableContainerState.setLayoutDirection(layoutDirection, getCurrentIndex());
diff --git a/graphics/java/android/graphics/drawable/DrawableWrapper.java b/graphics/java/android/graphics/drawable/DrawableWrapper.java
index bd8eae0..58d43f9 100644
--- a/graphics/java/android/graphics/drawable/DrawableWrapper.java
+++ b/graphics/java/android/graphics/drawable/DrawableWrapper.java
@@ -258,7 +258,7 @@ public abstract class DrawableWrapper extends Drawable implements Drawable.Callb
}
@Override
- public boolean onLayoutDirectionChange(@View.ResolvedLayoutDir int layoutDirection) {
+ public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
return mDrawable != null && mDrawable.setLayoutDirection(layoutDirection);
}
diff --git a/graphics/java/android/graphics/drawable/LayerDrawable.java b/graphics/java/android/graphics/drawable/LayerDrawable.java
index e5b4612..5c00a23 100644
--- a/graphics/java/android/graphics/drawable/LayerDrawable.java
+++ b/graphics/java/android/graphics/drawable/LayerDrawable.java
@@ -1662,7 +1662,7 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
}
@Override
- public boolean onLayoutDirectionChange(int layoutDirection) {
+ public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
boolean changed = false;
final ChildDrawable[] array = mLayerState.mChildren;