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

Commit 52424c93 authored by Selim Cinek's avatar Selim Cinek
Browse files

Don't scale textViews when transforming if their text isn't equal

Change-Id: I34f8299790da84edbfdb1e3679181d68023a24ff
Fixes: 79876736
Test: add group, observe normal scaling when dragging down
parent 645c8671
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()