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

Commit 02fc5ccc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Made ImageView.animateTransform(Matrix) public"

parents 60cfbed4 3ac312ac
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -54181,6 +54181,7 @@ package android.widget {
    ctor public ImageView(android.content.Context, android.util.AttributeSet);
    ctor public ImageView(android.content.Context, android.util.AttributeSet, int);
    ctor public ImageView(android.content.Context, android.util.AttributeSet, int, int);
    method public void animateTransform(android.graphics.Matrix);
    method public final void clearColorFilter();
    method public boolean getAdjustViewBounds();
    method public boolean getBaselineAlignBottom();
+12 −3
Original line number Diff line number Diff line
@@ -1331,9 +1331,17 @@ public class ImageView extends View {
        }
    }

    /** @hide */
    @UnsupportedAppUsage
    public void animateTransform(Matrix matrix) {
    /**
     * Applies a temporary transformation {@link Matrix} to the view's drawable when it is drawn.
     * Allows custom scaling, translation, and perspective distortion during an animation.
     *
     * This method is a lightweight analogue of {@link ImageView#setImageMatrix(Matrix)} to use
     * only during animations as this matrix will be cleared after the next drawable
     * update or view's bounds change.
     *
     * @param matrix The transformation parameters in matrix form.
     */
    public void animateTransform(@Nullable Matrix matrix) {
        if (mDrawable == null) {
            return;
        }
@@ -1341,6 +1349,7 @@ public class ImageView extends View {
            final int vwidth = getWidth() - mPaddingLeft - mPaddingRight;
            final int vheight = getHeight() - mPaddingTop - mPaddingBottom;
            mDrawable.setBounds(0, 0, vwidth, vheight);
            mDrawMatrix = null;
        } else {
            mDrawable.setBounds(0, 0, mDrawableWidth, mDrawableHeight);
            if (mDrawMatrix == null) {