title: How to use default animations in Android?
body: <p>I'm trying to use the default animations for the Activity with fragments.. here I found something about it:</p>
  
  <p><a href="https://stackoverflow.com/questions/14376810/android-using-activitys-default-animation-for-fragments">Android: using Activity&#39;s default animation for Fragments</a></p>
  
  <p>the problem is: ok, I need (for example) "activityOpenEnterAnimation".. how can I use it?</p>
  
  <p>Using the following code won't work:</p>
  
  <pre><code>        FragmentTransaction transaction = fragmentManager.beginTransaction();
          transaction.setCustomAnimations(android.R.anim.activityOpenEnterAnimation, android.R.anim.activityOpenExitAnimation);
  
          transaction.replace(R.id.container, fragment)
                  .addToBackStack(((Object) fragment).getClass().getName())
                  .commit();
  </code></pre>
  
  <p>Hints? Thanks! :)</p>