title: layout_gravity bottom not working
body: <p>I am using the following XML to draw a layout with heading, subheading, image and button. Image takes all remaining space but at the end I set it to <code>visibility = View.GONE</code> and my button is not aligned to bottom. What am I doing wrong?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingLeft="10dp"
      android:paddingRight="10dp"
      android:paddingBottom="10dp"
      android:baselineAligned="false"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/kasel"
          android:id="@+id/txtChokeNext"
          android:textSize="20sp"
          android:gravity="center_horizontal"
          android:layout_marginTop="10dp"
          android:layout_gravity="top"/&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/kaselDesc"
          android:id="@+id/txtChokeNextDesc"
          android:gravity="center"
          android:layout_marginTop="10dp"
          android:textStyle="bold"
          android:layout_gravity="top"/&gt;
  
      &lt;ImageView
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:id="@+id/imgChokeDesc"
          android:src="@drawable/kasel"
          android:adjustViewBounds="true"
          android:baselineAlignBottom="false"
          android:cropToPadding="false"
          android:layout_weight="1" /&gt;
  
      &lt;Button
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/firstAidNext"
          android:id="@+id/buttonChokeNext"
          android:layout_marginTop="10dp"
          android:paddingLeft="10dp"
          android:paddingTop="20dp"
          android:paddingRight="10dp"
          android:paddingBottom="20dp"
          android:layout_gravity="bottom"
          /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Thanks in forward</p>