title: animation to transition between views with rotation on z-axis with depth perception
body: <p>I'm trying to create an animation to transition between two views, both of which are ExpandableListViews.  The look I want is described in the image below.</p>
  
  <p>I tried using a shrink_to_middle and grow_from_middle as the out/in animations of my ViewAnimator - and it's close, but not quite right - with my current shrink/grow, as the animation is taking place, both the right and left edges of the views are the same height, which does not provide any depth to the animation.</p>
  
  <p>I'm not sure how best to explain what I want, which is why I drew the image, but here goes anyways...  I want to have a 3-d look to the animation where the view is rotated on the z-axis.  Assuming we use a simple shrink_to_middle and grow_from_middle animation as the starting point (which does not provide a 3-d look.)  To provide the 3-d look, the out animation would have the right edge get progressively smaller as the view shrinks to the middle; the in animation would have the left edge get progressively larger as the view grows from the middle.</p>
  
  <p>Images 1 through 4 would be the out animation (for view #1) and images 5-8 would be the in animation (for view #2)</p>
  
  <p><img src="https://i.stack.imgur.com/Ngxw3.jpg" alt="animation to transition between views"></p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Edit</strong>:
  FYI, Here are my current shrink to middle and grow from middle animation xml files</p>
  
  <p>shrink_to_middle.xml</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;scale android:interpolator="@android:anim/linear_interpolator"
          android:fromXScale="1.0" android:toXScale="0.0" android:fromYScale="1.0"
          android:toYScale="1.0" android:fillAfter="false" android:duration="500" /&gt;
      &lt;translate android:fromXDelta="0" android:toXDelta="50%"
          android:duration="500" /&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>grow_from_middle.xml</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;scale android:interpolator="@android:anim/linear_interpolator"
          android:fromXScale="0.0" android:toXScale="1.0" android:fromYScale="1.0"
          android:toYScale="1.0" android:fillAfter="false" android:startOffset="200"
          android:duration="500" /&gt;
      &lt;translate android:fromXDelta="50%" android:toXDelta="0"
          android:startOffset="200" android:duration="500" /&gt;
  &lt;/set&gt;
  </code></pre>