Fragment Transaction Animation not Working in Android 6.0+
<p>I am using the <code>setCustomAnimations()</code> method to absolutely no effect in Android 6.0.1. All that happens is that the fragment gets stuck for the duration of the animation to the left of the screen leaving a white space on the rest of the screen and then occupies the screen without any animation. It works perfectly in all the versions &lt;6.0. I'm using the method as follows:</p>

<pre><code>FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.setCustomAnimations
            (R.anim.slide_in_left, R.anim.slide_out_left, 0, 0);
MyFragment myFragment = new MyFragment();
fragmentTransaction.replace(R.id.fragmentContainer, myFragment,
            ResourceUtil.resByName(context, R.string.myFragmentText));
fragmentTransaction.commit();
</code></pre>

<p>Also, the slide_in_left XML file is as follows:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
&lt;translate
    android:fromXDelta="-100%" android:toXDelta="0%"
    android:fromYDelta="0%" android:toYDelta="0%"
    android:duration="300"/&gt;
&lt;/set&gt;
</code></pre>