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

Commit 26ec7125 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge "Don't scale textViews when transforming if their text isn't equal" into...

Merge "Don't scale textViews when transforming if their text isn't equal" into pi-dev am: f84132ed
am: 30e1f4c9

Change-Id: I0ca9eec396726b253cad26481f22f71555225156
parents 85af84ed 30e1f4c9
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()