title: Anchor Imageview at view bottom on scrollview layout
body: <p>I have a scrollview layout with several linear layouts inside. The last view of the scrollview is an ImageView which I need to appear always at the bottom of the screen.
  The content of the view is dynamic, and sometimes the screen does need to be scrolled and sometimes not.
  If the screen needs to be scrolled, the ImageView is shown correctly at the bottom. Take a look at the picture. This is an example of a scrolled screen, the imageView is the green bar.
  <img src="https://i.stack.imgur.com/UQQrQ.png" alt="enter image description here" /></p>
  <p>And this is an example of a screen that doesn't need to be scrolled, and as you can see, the image view is shown just below the textview.</p>
  <p><img src="https://i.stack.imgur.com/Bm5ep.png" alt="enter image description here" /></p>
  <p>And here is my current XML file:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;ScrollView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:layout_width=&quot;fill_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
    &gt;
  
      &lt;LinearLayout
          android:layout_width=&quot;fill_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:orientation=&quot;vertical&quot;
        &gt;
  
         &lt;ImageView
              android:id=&quot;@+id/imagen_view11&quot;
              android:layout_width=&quot;fill_parent&quot;
              android:layout_height=&quot;60dp&quot;
              android:scaleType=&quot;fitXY&quot;
              android:src=&quot;@drawable/sector1&quot; /&gt;
  
          &lt;ImageView
              android:id=&quot;@+id/imagen_view&quot;
              android:layout_width=&quot;fill_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:scaleType=&quot;fitXY&quot;
              android:src=&quot;@drawable/actpercusion&quot; /&gt;
  
          &lt;TextView
              android:id=&quot;@+id/titulo_label&quot;
              android:layout_width=&quot;fill_parent&quot;
              android:layout_height=&quot;match_parent&quot;
              android:gravity=&quot;center_horizontal&quot;
              android:text=&quot;TextView TextView TextView TextView&quot;
              android:textSize=&quot;25sp&quot;
              android:textStyle=&quot;bold&quot; /&gt;
  
  &lt;TextView
          android:id=&quot;@+id/lugar_label&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:text=&quot;TextView&quot; /&gt;
  
  &lt;LinearLayout
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot; &gt;
  
     &lt;RelativeLayout
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;match_parent&quot;
          android:gravity=&quot;right&quot; &gt;
  
          &lt;ImageButton
              android:id=&quot;@+id/boton_web&quot;
              android:layout_width=&quot;80dp&quot;
              android:layout_height=&quot;80dp&quot;
              android:layout_alignParentRight=&quot;true&quot;
              android:scaleType=&quot;fitXY&quot;
              android:src=&quot;@drawable/web&quot;
              android:text=&quot;Button web&quot; /&gt;
  
          &lt;LinearLayout
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_toLeftOf=&quot;@+id/boton_web&quot;
              android:orientation=&quot;vertical&quot; &gt;
  
              &lt;ImageButton
                  android:id=&quot;@+id/boton_mapa&quot;
            android:layout_width=&quot;80dp&quot;
              android:layout_height=&quot;80dp&quot;
              android:scaleType=&quot;fitXY&quot;
              android:src=&quot;@drawable/maps&quot;
              android:onClick=&quot;openMapa&quot;
                  android:text=&quot;Button mapa&quot; /&gt;
          &lt;/LinearLayout&gt;
      &lt;/RelativeLayout&gt;
     
  &lt;/LinearLayout&gt;
  
  &lt;TextView
      android:id=&quot;@+id/descripcion_texto&quot;
      android:layout_width=&quot;fill_parent&quot;
      android:layout_height=&quot;0dp&quot;
      android:layout_weight=&quot;1&quot;
      android:text=&quot;TextView&quot; /&gt;
   &lt;ImageView
              android:id=&quot;@+id/imagen_v&quot;
              android:layout_width=&quot;fill_parent&quot;
              android:layout_height=&quot;60dp&quot;
              android:scaleType=&quot;fitXY&quot;
              android:layout_alignParentBottom=&quot;true&quot; 
              android:src=&quot;@drawable/sector3&quot; /&gt;
           
      &lt;/LinearLayout&gt;
  
   
  
  &lt;/ScrollView&gt;
  </code></pre>
  <p>I would need to change my layout file so that the image view always appears at the bottom of the screen, independently if the screen needs to be scrolled or not.
  Any help is welcome.</p>