Note that there are some explanatory texts on larger screens.

plurals
  1. POFragment standard transition not animating
    text
    copied!<p>I'm using the v4 android compatibility library to develop a tablet UI using fragments specifically for Android 2.2 devices and up.</p> <p>Everything is working as it should, except that I can't get any animations to work, not even the standard animations.</p> <p>Code:</p> <pre><code>FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); ABCFragment abcFragment = new ABCFragment(); ft.replace(R.id.main_frame_layout_fragment_holder,abcFragment); ft.addToBackStack(null); ft.commit(); </code></pre> <p>Instead of using a transit animation, the fragment freezes for about a second and the just disappears and the new one appears.</p> <p>Using:</p> <pre><code>ft.setCustomAnimations(android.R.anim.slide_in_left,android.R.anim.slide_out_right); </code></pre> <p>doesn't work either.</p> <p>XML:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res/com.synergygb.mycustomapp" android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:gravity="bottom"&gt; &lt;FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/main_frame_layout_fragment_holder"&gt; &lt;/FrameLayout&gt; &lt;!-- OTHER FIXED UI ELEMENTS--&gt; &lt;/RelativeLayout&gt; </code></pre> <p>I read that the custom animation were broken in the compatibility library, but no one seems to be having issues with the standard transitions. I've tested this on a 3.2.1 Motorola Xoom, 2.3 Galaxy Tab 7", 2.2 emulator, and even on a HTC G2 with 2.3.4.</p> <p>What could be wrong here?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload