title: Android FrameLayout z-index issue when child is elevated
body: <p>I have following Android XML layout file: </p>
  
  <pre><code>    &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginEnd="@dimen/AutoComplete_marginSides"
          android:layout_marginRight="@dimen/AutoComplete_marginSides"
          android:layout_marginTop="@dimen/AutoComplete_marginTopBottom"
          android:layout_marginBottom="@dimen/AutoComplete_marginTopBottom"
          android:layout_marginLeft="@dimen/AutoComplete_marginSides"
          android:layout_marginStart="@dimen/AutoComplete_marginSides"
          android:id="@+id/autoCompleteLayout" &gt;
  
          &lt;MyPackage.maps.DelayAutoCompleteTextView
              android:id="@+id/geoAutoComplete"
              android:layout_margin="@dimen/AutoCompleteTextView_layoutMargin"
              android:layout_width="match_parent"
              android:layout_height="@dimen/AutoCompleteTextView_height"
              android:layout_gravity="center"
              android:gravity="start|center_vertical"
              android:inputType="textCapSentences"
              android:background="@color/white"
              android:paddingLeft="@dimen/AutoCompleteTextView_padding"
              android:paddingRight="@dimen/AutoCompleteTextView_padding"
              android:dropDownWidth="fill_parent"
              android:textSize="@dimen/AutoCompleteTextView_fontSize"
              android:hint="@string/search_map"
              android:elevation="2dp"
              android:singleLine="true"
              android:maxLength="30"/&gt;
  
          &lt;ImageView
              android:id="@+id/geoAutoCompleteClear"
              android:layout_gravity="center_vertical|end"
              android:contentDescription="@string/search_map_clear"
              android:layout_marginEnd="@dimen/AutoCompleteTextView_clearIconMargins"
              android:layout_marginRight="@dimen/AutoCompleteTextView_clearIconMargins"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/ic_clear"/&gt;
  
      &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>The <code>FrameLayout</code> layout is inside of <code>RelativeLayout</code> (I did not show that above). This <code>FrameLayout</code> is just text view with a cross at the end to remove text. </p>
  
  <p>The problem is that when I add <code>android:elevation</code> to <code>TextView</code> that <code>ImageView</code> goes behind the <code>TextView</code> although it shouldn't because I defined that after <code>TextView</code> itself. As far as I know, child sequence is what determines how components are shown. But when I remove <code>elevation</code> from <code>TextView</code>, that <code>ImageView</code> is shown properly. </p>
  
  <p>Am I missing here something? What is the reason of this?</p>