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

Commit 6f4fcdc4 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a transformation error when fading in views

Views could still be stuck in a old translation and
therefore the whole view looked weird.

Change-Id: I48a8f8824d8e5bdb0913a24783967a36c34797a8
parent a4091507
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -293,14 +293,19 @@ public class TransformState {
        mTransformedView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
        mTransformedView.setAlpha(visible ? 1.0f : 0.0f);
        if (visible) {
            mTransformedView.setTranslationX(0);
            mTransformedView.setTranslationY(0);
            mTransformedView.setScaleX(1.0f);
            mTransformedView.setScaleY(1.0f);
            resetTransformedView();
        }
    }

    public void prepareFadeIn() {
        resetTransformedView();
    }

    private void resetTransformedView() {
        mTransformedView.setTranslationX(0);
        mTransformedView.setTranslationY(0);
        mTransformedView.setScaleX(1.0f);
        mTransformedView.setScaleY(1.0f);
    }

    public static TransformState obtain() {