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

Commit 1ff328de authored by Annie Chin's avatar Annie Chin
Browse files

Prevent slide-in animation on history pulldown.

Do not use an entry animation when HistoryFragment is pulled down.

Change-Id: I8c76d445c4cf0c96c4cc736ef72e3886572b2ac6
parent 70ac8eaf
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -19,9 +19,9 @@ package com.android.calculator2;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
@@ -179,7 +179,11 @@ public class HistoryFragment extends Fragment {
        final View view = getView();
        final int height = getResources().getDisplayMetrics().heightPixels;
        if (enter) {
            if (transit == FragmentTransaction.TRANSIT_FRAGMENT_OPEN) {
                return ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, -height, 0f);
            } else {
                return null;
            }
        } else {
            return ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, -height);
        }