title: Android animation Fragment sliding in with time delay
body: <p>I split the screen into 2 as per my design and the top part is filled with Top Fragment and bottom with Bottom Fragment. Initial alignment works fine. </p>
  
  <p>But I have a series of top fragments that have to slide from right to left with time delay of 0.5 sec each. Also, when the first fragment slides in before it finishes sliding to left (probably when 25% left to complete the left slide) the second slide has to start from the right.</p>
  
  <p>All these need to happen immediately. </p>
  
  <p>So, I wrote the below code, but only the last fragment slides in, the rest of the fragments do not. Please let me know how to correct this code.</p>
  
  <h1>My Activity Class</h1>
  
  <pre><code>    import android.app.Activity;
      import android.app.Fragment;
      import android.app.FragmentManager;
      import android.app.FragmentTransaction;
      import android.os.Bundle;
      import android.view.View;
      import android.view.View.OnClickListener;
      import android.widget.Button;
  
  
          public class SampleActivity extends Activity {
  
              private void incarnate(FragmentManager fm){
                  int layoutId = R.id.frame;
                  boolean fragmentWasNull = false;
                  Fragment f = fm.findFragmentById(layoutId);
                  FragmentTransaction ft = fm.beginTransaction();
                  ft.add(layoutId, new ClinicloudGreyFragment(),  "main").commit();
  
                  FragmentTransaction ft1 = fm.beginTransaction();
                  ft1.add(R.id.bottomPanel,new ClinicloudBottonFragment());
                  ft1.commit();
  
              }
  
              @Override
              protected void onCreate(Bundle savedInstanceState) {
                  super.onCreate(savedInstanceState);
                  setContentView(R.layout.activity_sample);
                  FragmentManager fm = getFragmentManager();
                  incarnate(fm);
  
                  FragmentTransaction transaction = fm.beginTransaction();
                  transaction.setCustomAnimations(R.anim.slidein, R.anim.slideout);
                  transaction.replace(R.id.frame, new ClinicloudGreyFragment()).commit();
  
                  FragmentTransaction transaction1 = fm.beginTransaction();
                  transaction1.setCustomAnimations(R.anim.slideinwithhalfasecdelay, R.anim.slideout);
                  transaction1.replace(R.id.frame, new ClinicloudPurpleFragment()).commit();
  
                  FragmentTransaction transaction2 = fm.beginTransaction();
                  transaction2.setCustomAnimations(R.anim.slideinwithasecdelay, R.anim.slideout);
                  transaction2.replace(R.id.frame, new ClinicloudOrangeFragment()).commit();
  
                  FragmentTransaction transaction3 = fm.beginTransaction();
                      transaction3.setCustomAnimations(R.anim.slideinwithoneandhalfasecdelay, R.anim.slideout);
                  transaction3.replace(R.id.frame, new ClinicloudYellowFragment()).commit();
  
                  FragmentTransaction transaction4 = fm.beginTransaction();
                  transaction4.setCustomAnimations(R.anim.slideinwithtwosecdelay, R.anim.slideout);
                  transaction4.replace(R.id.frame, new ClinicloudBlueFragment()).commit();
  
  
  
              }
          }
  
  Sliding in and sliding out (I dont want sliding out ONLY sliding in to the left from right)
  Sliding in 
  ==========
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;objectAnimator
          android:valueFrom="1"
          android:valueTo="0"
          android:valueType="floatType"
          android:propertyName="XFraction"
          android:startOffset="1000"
           /&gt;
      &lt;objectAnimator
          android:valueFrom="1.0" android:valueTo="0.0"
          android:valueType="floatType"
          android:propertyName="alpha"
          android:duration="@android:integer/config_mediumAnimTime" /&gt;
  &lt;/set&gt;
  
  Sliding out
  ===========
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;objectAnimator
          android:valueFrom="0"
          android:valueTo="0"
          android:valueType="floatType"
          android:propertyName="translationX"
          android:duration="@android:integer/config_mediumAnimTime" /&gt;
      &lt;objectAnimator
          android:valueFrom="0.0"
          android:valueTo="0.0"
          android:valueType="floatType"
          android:propertyName="alpha"
          android:duration="@android:integer/config_mediumAnimTime" /&gt;
  &lt;/set&gt;
  
  Fragment Example:
  -----------------
  
      &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;com.clinicloud.app.LL xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          android:background="#1893D2"
          &gt;
  
  
      &lt;/com.clinicloud.app.LL&gt;
  
  
  
  public class LL extends LinearLayout {
  
  
          public LL(Context context) {
              super(context);
          }
  
          public LL(Context context, AttributeSet attrs) {
              super(context, attrs);
          }
  
          public float getXFraction() {
              final int width = getWidth();
              if (width != 0) return getX() / getWidth();
              else return getX();
          }
  
          public void setXFraction(float xFraction) {
              final int width = getWidth();
              float newWidth = (width &gt; 0) ? (xFraction * width) : -9999;
              setX(newWidth);
          }
  
  }
  </code></pre>
  
  <p>I followed the last answer from this thread <a href="https://stackoverflow.com/questions/25699178/cant-get-objectanimator-working-with-xfraction/27924975#27924975">Can&#39;t get objectAnimator working with xFraction</a></p>