title: Animate Resize View in Material Design
body: <p>Without involving layoutParams, is there another way to resize, collapse or expand a view? I saw that animations in some vieos of the new Material Design and in the new Android Dialer App. Google said Material can change shape, size, rotation, color, etc. easyly ... but I can't find anything. </p>
  
  <p>Is there backwards compatibility?</p>
  
  <p>Until now in order to resize, collapse or expand a view we had to work with layoutParams like this for example:</p>
  
  <pre><code>public static void collapse(final View v) {
  final int initialHeight = v.getMeasuredHeight();
  
  Animation a = new Animation()
  {
      @Override
      protected void applyTransformation(float interpolatedTime, Transformation t) {
          if(interpolatedTime == 1){
              v.setVisibility(View.GONE);
          }else{
              v.getLayoutParams().height = initialHeight - (int)(initialHeight * interpolatedTime);
              v.requestLayout();
          }
      }
  
      @Override
      public boolean willChangeBounds() {
          return true;
      }
  };
  
  a.setDuration((int)(initialHeight / v.getContext().getResources().getDisplayMetrics().density));
  v.startAnimation(a);
  </code></pre>
  
  <p>}</p>
  
  <p>Here is an example of what I want from the new Google Android Dialer App:</p>
  
  <p><img src="https://i.stack.imgur.com/uoAo5.jpg" alt="enter image description here"></p>