From 624067edec9edac40b98992326a27784348d8e5e Mon Sep 17 00:00:00 2001 From: Gavriil Sitnikov Date: Sat, 16 Jul 2016 15:19:29 +0300 Subject: [PATCH] fragment transaction first add animation removed --- .../roboswag/components/navigation/FragmentNavigation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/touchin/roboswag/components/navigation/FragmentNavigation.java b/src/main/java/ru/touchin/roboswag/components/navigation/FragmentNavigation.java index fd0a53c..d3cddbb 100644 --- a/src/main/java/ru/touchin/roboswag/components/navigation/FragmentNavigation.java +++ b/src/main/java/ru/touchin/roboswag/components/navigation/FragmentNavigation.java @@ -141,8 +141,10 @@ public class FragmentNavigation { final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction() .replace(containerViewId, fragment, null) - .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) .addToBackStack(backStackTag); + if (fragmentManager.getBackStackEntryCount() != 0) { + fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); + } if (transactionSetup != null) { transactionSetup.call(fragmentTransaction).commit(); } else {