title: Setting "z-index" on LinearLayout on android
body: <p>I am placing four image views on a vertical linear layout. I want them to ocuppy the same space, so I assign to each an <code>android:layout_weight="1"</code>. I also want them to overlap (that is a design requeriment), so I set a negative margin for each view. The last image I add (<code>@+id/floor_1st</code>) is the last to be added (the one at the bottom), so it stays at the front. However, I want it to be the other way around: I want the first image on layout to be at the front followed by the second and so on (the last image shuld be at the back).</p>
  
  <p>I understand that it is easier to control the order the images are placed using a <code>RelativeLayout</code>, but I do not know how to place the images the way I want using this layout. I have also seen that is possible to use the method <code>bringToFront()</code>, but that just do not let the images to overlap.</p>
  
  <p>So, is there any way to place the images in the order I want using <code>LinearLayout</code>? Or should I use another layout? In this case, how should I place the images?</p>
  
  <p>Here is my xml code</p>
  
  <pre><code>&lt;LinearLayout
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+id/floors_container"
      android:layout_gravity="center_horizontal"
      android:layout_marginTop="@dimen/overview_buttons_top_margin"
      android:layout_marginBottom="@dimen/overview_buttons_bottom_margin"
      &gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/floor_4th"
          android:src="@drawable/piso_4"
          android:layout_weight="1"
          android:layout_gravity="center_horizontal"
          android:layout_marginBottom="@dimen/floors_overview_margin_three_quarter"
          android:clickable="true" /&gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/floor_3rd"
          android:src="@drawable/piso_3"
          android:layout_gravity="center_horizontal"
          android:layout_weight="1"
          android:layout_marginTop="@dimen/floors_overview_margin_quarter"
          android:layout_marginBottom="@dimen/floors_overview_margin_half"
          android:clickable="true" /&gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/floor_2nd"
          android:layout_gravity="center_horizontal"
          android:src="@drawable/piso_2"
          android:layout_weight="1"
          android:layout_marginTop="@dimen/floors_overview_margin_half"
          android:layout_marginBottom="@dimen/floors_overview_margin_quarter"
          android:clickable="true" /&gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/floor_1st"
          android:src="@drawable/piso_1"
          android:layout_gravity="center_horizontal"
          android:layout_weight="1"
          android:layout_marginTop="@dimen/floors_overview_margin_three_quarter"
          android:clickable="true" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Thanks.</p>