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

Commit be23fa2f authored by ztenghui's avatar ztenghui
Browse files

Make the reveal animation API public

Change-Id: Iafb17bc768b33b320ffa731a9474be05382126e6
parent aaa11421
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -29319,6 +29319,7 @@ package android.view {
    method protected int computeVerticalScrollRange();
    method public android.view.accessibility.AccessibilityNodeInfo createAccessibilityNodeInfo();
    method public void createContextMenu(android.view.ContextMenu);
    method public final android.animation.ValueAnimator createRevealAnimator(int, int, float, float);
    method public void destroyDrawingCache();
    method public android.view.WindowInsets dispatchApplyWindowInsets(android.view.WindowInsets);
    method public void dispatchConfigurationChanged(android.content.res.Configuration);
+31 −6
Original line number Diff line number Diff line
@@ -10812,15 +10812,40 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    /**
     * Returns a ValueAnimator which can be used to run a reveal animation,
     * clipping the content of the view to a circle.
     * Returns a ValueAnimator which can animate a clipping circle.
     * <p>
     * The View will be clipped to the animating circle.
     * <p>
     * Any shadow cast by the View will respect the circular clip from this animator.
     *
     * @param centerX The x coordinate of the center of the animating circle.
     * @param centerY The y coordinate of the center of the animating circle.
     * @param startRadius The starting radius of the animating circle.
     * @param endRadius The ending radius of the animating circle.
     */
    public final ValueAnimator createRevealAnimator(int centerX,  int centerY,
            float startRadius, float endRadius) {
        return RevealAnimator.ofRevealCircle(this, centerX, centerY,
                startRadius, endRadius, false);
    }
    /**
     * Returns a ValueAnimator which can animate a clearing circle.
     * <p>
     * The View is prevented from drawing within the circle, so the content
     * behind the View shows through.
     *
     * @param centerX The x coordinate of the center of the animating circle.
     * @param centerY The y coordinate of the center of the animating circle.
     * @param startRadius The starting radius of the animating circle.
     * @param endRadius The ending radius of the animating circle.
     *
     * TODO: Make this a public API.
     * @hide
     */
    public final ValueAnimator createRevealAnimator(int x, int y,
            float startRadius, float endRadius, boolean inverseClip) {
        return RevealAnimator.ofRevealCircle(this, x, y, startRadius, endRadius, inverseClip);
    public final ValueAnimator createClearCircleAnimator(int centerX,  int centerY,
            float startRadius, float endRadius) {
        return RevealAnimator.ofRevealCircle(this, centerX, centerY,
                startRadius, endRadius, true);
    }
    /**