title: Android - Updating View's Height on translationY() Animation
body: <p>I have a layout that I want to expand after button click, as shown below:</p>
  
  <p><img src="https://i.stack.imgur.com/5YlDr.png" alt="Expectation"></p>
  
  <p>The problem is <strong>I need to use Animation</strong>, so I decided to use <code>View.animate.translationY()</code>. Here is my code:</p>
  
  <pre><code>private void showBottomThreeLines(boolean show){
      if(show)
          mShiftContainer.animate().translationY(0);
      else
          mShiftContainer.animate().translationY(-(mFifthLineContainer.getHeight() * 3));
  }
  </code></pre>
  
  <p>However, this is what I get after testing:</p>
  
  <p><img src="https://i.stack.imgur.com/3yaY0.png" alt="Reality"></p>
  
  <p>The <strong>current height</strong> is still the same as the <strong>previous height</strong>! The view's height is using <code>MATCH_PARENT</code>. I even tried to change it to <code>1000dp</code>, but it still has the same height. How do I update view's height during <code>translationY()</code> animation?</p>