From cb45c512312d5225cca9db59ea0473667a42f4da Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 31 Jan 2019 10:01:10 +0000 Subject: [PATCH] Fixed list/item animation --- app/src/main/java/eu/faircode/email/ActivityView.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index 6227c5ba49..4ae16c90ce 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -44,6 +44,7 @@ import android.os.ParcelFileDescriptor; import android.preference.PreferenceManager; import android.provider.ContactsContract; import android.text.TextUtils; +import android.util.TypedValue; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; @@ -1095,9 +1096,14 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB args.putBoolean("pane", true); } + TypedValue enter = new TypedValue(); + TypedValue exit = new TypedValue(); + getTheme().resolveAttribute(android.R.attr.activityOpenEnterAnimation, enter, false); + getTheme().resolveAttribute(android.R.attr.activityOpenExitAnimation, exit, false); + FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); fragmentTransaction.setCustomAnimations( - android.R.anim.fade_in, android.R.anim.fade_in, + enter.resourceId, exit.resourceId, android.R.anim.fade_out, android.R.anim.fade_out); fragmentTransaction.replace(pane, fragment).addToBackStack("thread"); fragmentTransaction.commit();