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

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

Merge "Don't scale textViews when transforming if their text isn't equal" into pi-dev

parents cff36e41 52424c93
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -35,10 +35,8 @@ public class TextViewTransformState extends TransformState {
    @Override
    public void initFrom(View view, TransformInfo transformInfo) {
        super.initFrom(view, transformInfo);
        if (view instanceof TextView) {
        mText = (TextView) view;
    }
    }

    @Override
    protected boolean sameAs(TransformState otherState) {
@@ -94,6 +92,9 @@ public class TextViewTransformState extends TransformState {
            return false;
        }
        TextViewTransformState otherTvs = (TextViewTransformState) otherState;
        if (!TextUtils.equals(mText.getText(), otherTvs.mText.getText())) {
            return false;
        }
        int lineCount = mText.getLineCount();
        return lineCount == 1 && lineCount == otherTvs.mText.getLineCount()
                && getEllipsisCount() == otherTvs.getEllipsisCount()