title: android lollipop - setentertransition() for fragment not working properly on exiting
body: <p>While replacing fragment, I am using Slide animation available for android lollipop version. It works as expected for this particular replacement, but on pressing back button it first pops back current fragment &amp; then reverse of enter animation (slide out) is executed.</p>
  
  <pre><code>private void replaceContentFrameByFragment(Fragment replaceBy, String replaceByFragmentTag) {
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
              Slide slide = new Slide(Gravity.BOTTOM);
              slide.setDuration(1000);
              replaceBy.setEnterTransition(slide);
      }
      FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
      fragmentTransaction.replace(R.id.content_frame, replaceBy, replaceByFragmentTag);
      fragmentTransaction.addToBackStack(null);
      fragmentTransaction.commitAllowingStateLoss();
  }
  </code></pre>
  
  <p>So, how to force fragment to pop back only after reverse animation of slide is finished? I noticed that activity has method finishAfterTransition() provided. Is there something similar for frgament?</p>