title: Exclude certain elements from being animated in android layout transitions
body: <p>I have a question regarding the android layout transition framework. In particular i want to achieve an effect that a certain part of an layout slides down or up depending on the visibility of another view(s).</p>
  
  <p>Imagine the following layout. (And please overlook the nested LinearLayouts here ;) )</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:animateLayoutChanges="true"&gt;
  
      &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
  
          &lt;View
                  android:id="@+id/changingView1"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:visibility="gone"/&gt;
  
          &lt;View
                  android:id="@+id/changingView2"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:visibility="gone"/&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
              android:id="@+id/movingView"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:animateLayoutChanges="false"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Now what i want to achieve is that when <strong>changingView1</strong> and <strong>changingView2</strong> change their visibility that <strong>movingView</strong> slides up or down. </p>
  
  <p>By enabling the <strong>LayoutTransition.CHANGING</strong> for the parent layout the sliding part works fine so. But this has the side effect that the <strong>movingView</strong> will also be animated when there are being items added or removed because this layout changes its bounds. And here lies my problem because this results in a very strange looking animation. </p>
  
  <p>So back to my question. Is there a way to keep the sliding animation without animating layout bound changes on the <strong>movingView</strong>?</p>
  
  <p>Disabling layoutTransitions on the <strong>movingView</strong> obviously does not help because this only effects the animations of the child views. I also tried playing around with enabling and disabling different LayoutTransitions on the parent layout but so far without the desired effect.</p>
  
  <p>If i can add more details please let me know otherwise i hope someone can help me out.</p>
  
  <p>Thanks in advance!</p>