Add EdgeEffect#setColor
Bug: 15725269
Change-Id: Ifdb0a53d1f17e2433683e51d09588545b69e6238
diff --git a/api/current.txt b/api/current.txt
index 0869166..ef7daad 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -36458,12 +36458,14 @@
ctor public EdgeEffect(android.content.Context);
method public boolean draw(android.graphics.Canvas);
method public void finish();
+ method public int getColor();
method public int getMaxHeight();
method public boolean isFinished();
method public void onAbsorb(int);
method public void onPull(float);
method public void onPull(float, float);
method public void onRelease();
+ method public void setColor(int);
method public void setSize(int, int);
}
diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java
index 2502954..90fec23 100644
--- a/core/java/android/widget/EdgeEffect.java
+++ b/core/java/android/widget/EdgeEffect.java
@@ -286,6 +286,22 @@
mTargetDisplacement = 0.5f;
}
+ /**
+ * Set the color of this edge effect in argb.
+ *
+ * @param color Color in argb
+ */
+ public void setColor(int color) {
+ mPaint.setColor(color);
+ }
+
+ /**
+ * Return the color of this edge effect in argb.
+ * @return The color of this edge effect in argb
+ */
+ public int getColor() {
+ return mPaint.getColor();
+ }
/**
* Draw into the provided canvas. Assumes that the canvas has been rotated