title: The spinner is hidden by the background of the liner layout
body: <p>I want to display the spinner in a rectangle with soild fill color around it. My code is given below</p>
  
  <pre><code>          &lt;LinearLayout
      android:id="@+id/linearLayout"
      android:layout_width="0dp"
      android:layout_height="113dp"
      android:layout_margin="10dp"
      android:layout_marginStart="9dp"
      android:layout_marginLeft="9dp"
      android:layout_marginEnd="9dp"
      android:layout_marginRight="9dp"
      android:background="@drawable/rectangle_shape"
      android:orientation="vertical"
      android:padding="10dp"
      android:visibility="visible"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"&gt;
  
      &lt;Spinner
          android:id="@+id/spinmain"
          android:layout_width="352dp"
          android:layout_height="25dp"
          android:layout_marginStart="16dp"
          android:layout_marginLeft="16dp"
          android:layout_marginTop="60dp"
          android:layout_marginBottom="416dp"
          android:dropDownVerticalOffset="35dp"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="@+id/view7" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and rectangle_shape.xml</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;layer-list xmlns:android="http://schemas.android.com/apk/re/android"&gt;
   &lt;item&gt;
      &lt;shape android:shape="rectangle"&gt;
          &lt;solid android:color="#FF0000" /&gt;
      &lt;/shape&gt;
  &lt;/item&gt;
  &lt;item android:left="5dp" android:right="5dp"  android:top="5dp" &gt;
      &lt;shape android:shape="rectangle"&gt;
          &lt;solid android:color="#000000" /&gt;
      &lt;/shape&gt;
     &lt;/item&gt;
     &lt;/layer-list&gt;
  </code></pre>
  
  <p>But the problem is that the spinner is hidden by the rectangle linear layout
  How can I bring the spinner in front of it.Please suggest </p>