title: FragmentTransacation with slide in/out animation on >4 performance
body: <p>I'm trying to implement fragment transaction with slide in/out animation.
  I'm developing on minimum 14 sdk so ObjectAnimator is the only option for me (<strong>is there any other way?</strong> translate animation is not available as I understand).</p>
  
  <p>The Code is very simple:</p>
  
  <p><strong>AnimationView.java - wrapper class</strong></p>
  
  <pre><code>public class AnimationView extends LinearLayout {
  
  public AnimationView(Context context, AttributeSet attrs) {
      super(context, attrs);
  }
  
  
  public float getYFraction() {
      return getHeight();
  }
  
  public void setYFraction(float yFraction) {
      final int height = this.getHeight();
      setY((height &gt; 0) ? (yFraction * height) : -9999);
  }
  }
  </code></pre>
  
  <p><strong>Slide in &amp; out xml's</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set&gt;
  &lt;objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
                  android:interpolator="@android:anim/accelerate_decelerate_interpolator"
                  android:propertyName="yFraction"
                  android:valueType="floatType"
                  android:valueFrom="-1"
                  android:valueTo="0"
                  android:duration="600"/&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set&gt;
  &lt;objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
                  android:interpolator="@android:anim/accelerate_decelerate_interpolator"
                  android:propertyName="yFraction"
                  android:valueType="floatType"
                  android:valueFrom="0"
                  android:valueTo="1"
                  android:duration="600"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>Animations works <strong>perfect</strong>, as you can see I used custom property yFraction. But performance are very bad... in some tablets I noticed a horizontal white line (around 3 px height) during the animation, in other smartphone device it went just to slow (not duration slow but Flickering).</p>
  
  <p><strong>I found a way to fix it if I set valueFrom &amp; valueTo to fit the view dimension, but it's not generic and need to be 0 to 1 to be generic for all views</strong> </p>
  
  <p>Would appreciate if some can help me or tell me if there's another way to implement on android 14 and up.</p>
  
  <p>Thanks.</p>