title: Adding a color background and border radius to a Layout
body: <p>I want to create a layout with rounded corners and a filled color background.</p>
  
  <p>This is my layout:</p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="210dp"
      android:orientation="vertical"
      android:layout_marginBottom="10dp"        
      android:background="@drawable/offerItemLayout"&gt;
      &lt;LinearLayout
          android:id="@+id/offerImageHolder"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
              .
              .
              .
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I have the following drawable xml (<code>offerItemLayout</code>) that creates the borders correctly: </p>
  
  
  
  <pre><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item&gt;
          &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
                 android:shape="rectangle"&gt;
              &lt;corners
                  android:radius="5dp"/&gt;
              &lt;stroke
                  android:width="1dp"
                  android:color="@color/bggrey" /&gt;            
          &lt;/shape&gt;
      &lt;/item&gt;
      // The lines below causes an inflation failure.
      &lt;item&gt;
          &lt;fill
              android:color="@color/white"/&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>But inserting the item with a fill causes the inflation of the layout to fail. </p>
  
  <p>Additionally, if I assign a color background to my inner LinearLayout (<code>offerImageHolder</code>), it overrides the first background with my rounded corners.</p>
  
  <p>Any thoughts on doing this properly? :/</p>