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

Commit bd54bcbc authored by Petar Šegina's avatar Petar Šegina Committed by Android (Google) Code Review
Browse files

Merge "Do not round corners on tall selection rectangles"

parents 326be275 29e59d8d
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -156,6 +156,12 @@ final class SmartSelectSprite {
            mExpansionDirection = expansionDirection;
            mRectangleBorderType = rectangleBorderType;
            mStrokeWidth = strokeWidth;

            if (boundingRectangle.height() > boundingRectangle.width()) {
                setRoundPercentage(0.0f);
            } else {
                setRoundPercentage(1.0f);
            }
        }

        /*
@@ -220,6 +226,10 @@ final class SmartSelectSprite {
            mRoundPercentage = newPercentage;
        }

        public float getRoundPercentage() {
            return mRoundPercentage;
        }

        private void setLeftBoundary(final float leftBoundary) {
            mLeftBoundary = leftBoundary;
        }
@@ -577,7 +587,7 @@ final class SmartSelectSprite {
        final ObjectAnimator animator = ObjectAnimator.ofFloat(
                shape,
                RoundedRectangleShape.PROPERTY_ROUND_PERCENTAGE,
                1.0F, 0.0F);
                shape.getRoundPercentage(), 0.0F);
        animator.setDuration(CORNER_DURATION);
        animator.addUpdateListener(listener);
        animator.setInterpolator(mCornerInterpolator);