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

Commit a279918c authored by Brian Attwell's avatar Brian Attwell
Browse files

Add EdgeEffect#setColor

Bug: 15725269
Change-Id: Ifdb0a53d1f17e2433683e51d09588545b69e6238
parent 51fa6bcb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -36458,12 +36458,14 @@ package android.widget {
    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);
  }
+16 −0
Original line number Diff line number Diff line
@@ -286,6 +286,22 @@ public class EdgeEffect {
        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