title: Animate view height in android
body: <p>I have a view holder with a button that toggles the visibility of other views <strong>(im toggling the visibility of the view with id <code>locals_additional_filters</code> )</strong> in the same layout.
  Now by making the views visible the parent layout height (<strong>id is <code>host_filter_holder</code></strong>) is being changed, and my question here is how can I animate the parent layout height?</p>
  
  <p>Here is my xml:</p>
  
  <pre><code>&lt;LinearLayout
          android:id="@+id/host_filter_holder"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/red_borders_btn"
          android:orientation="vertical"&gt;
  
          &lt;Button
              android:id="@+id/find_host_filter"
              android:layout_width="match_parent"
              android:layout_height="45dp"
              android:text="@string/more_filters"
              android:background="@null"
              android:textColor="@color/red_borders"
              android:textSize="16sp" /&gt;
  
          &lt;LinearLayout
              android:id="@+id/locals_additional_filters"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="10dp"
              android:orientation="vertical"
              android:padding="10dp"
              android:animateLayoutChanges="true"
              android:visibility="gone"&gt;
  
              &lt;RadioGroup
                  android:id="@+id/locals_gender_group"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="horizontal"&gt;
  
                  &lt;RadioButton
                      android:id="@+id/female"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="1"
                      android:checked="true"
                      android:text="Female"
                      android:textColor="@color/black" /&gt;
  
                  &lt;RadioButton
                      android:id="@+id/male"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="1"
                      android:text="Male"
                      android:textColor="@color/black" /&gt;
              &lt;/RadioGroup&gt;
  
              &lt;EditText
                  style="@style/NoBottomLineEditText"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="10dp"
                  android:clickable="true"
                  android:drawableEnd="@drawable/ic_arrow"
                  android:drawableRight="@drawable/ic_arrow"
                  android:hint="Search your friends in 2km" /&gt;
  
              &lt;TextView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="@string/interests"
                  android:textColor="@color/dark_gray"
                  android:textSize="14sp" /&gt;
  
              &lt;android.support.v7.widget.RecyclerView
                  android:id="@+id/locals_filter_recycle"
                  android:layout_width="match_parent"
                  android:layout_height="40dp" /&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>