title: Resizing layouts programmatically (as animation)
body: <p>I want to resize some layouts in my Activity.</p>
  
  <p>Here is the code of the main XML:</p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_weight="1"
      android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:id="@+id/top"
          android:layout_width="fill_parent"
          android:layout_height="0dip"
          android:layout_weight="1"
          android:background="#3ee3e3" &gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/middle"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_weight="1"&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/bottom"
          android:layout_width="fill_parent"
          android:layout_height="0dip"
          android:layout_weight="1"
          android:background="#fe51e6" &gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>As you can see, the top and bottom layouts height's is 0, and the middle 
  layout covers all the place. </p>
  
  <p>I want to programmatically decrease the middle layout size, while increase both the top
  and the bottom layout sizes, till all the layouts have the same height.</p>
  
  <p>I want it to be look like an animation.</p>
  
  <p>How should I do that?</p>
  
  <p>Thanks</p>