summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnnie Chin <afchin@google.com>2016-11-22 12:57:46 -0800
committerAnnie Chin <afchin@google.com>2016-11-22 13:05:25 -0800
commit1ff328de5f662e881b91d320b4dd869cc2bce7be (patch)
tree7cde9dc00b5d2bf704614ca28aa522d7a4672879 /src
parent70ac8eafeb18711e427d512dcbb3089977521df8 (diff)
downloadandroid_packages_apps_ExactCalculator-1ff328de5f662e881b91d320b4dd869cc2bce7be.tar.gz
android_packages_apps_ExactCalculator-1ff328de5f662e881b91d320b4dd869cc2bce7be.tar.bz2
android_packages_apps_ExactCalculator-1ff328de5f662e881b91d320b4dd869cc2bce7be.zip
Prevent slide-in animation on history pulldown.
Do not use an entry animation when HistoryFragment is pulled down. Change-Id: I8c76d445c4cf0c96c4cc736ef72e3886572b2ac6
Diffstat (limited to 'src')
-rw-r--r--src/com/android/calculator2/HistoryFragment.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/calculator2/HistoryFragment.java b/src/com/android/calculator2/HistoryFragment.java
index afc8803..5be3452 100644
--- a/src/com/android/calculator2/HistoryFragment.java
+++ b/src/com/android/calculator2/HistoryFragment.java
@@ -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) {
- return ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, -height, 0f);
+ 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);
}