title: Android L ripple touch effect on shape?
body: <p>I have a rounded rectangle with elevation that casts a shadow, just like in the example here: <a href="http://developer.android.com/preview/material/views-shadows.html#shadows" rel="noreferrer">http://developer.android.com/preview/material/views-shadows.html#shadows</a></p>
  
  <p>Here is my shape:</p>
  
  <pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
      android:shape="rectangle"&gt;
      &lt;solid android:color="@android:color/white" /&gt;
      &lt;corners android:radius="6dp" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>I want to get the nice "ripple" touch effect that everything else has, but when that's set as the view's background, no touch feedback is given. The shape stays white.</p>
  
  <p>So, I made it into a <code>layer-list</code>:</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;solid android:color="@android:color/white" /&gt;
              &lt;corners android:radius="6dp" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
      &lt;item android:drawable="?android:selectableItemBackground" /&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>Now I get nice touch feedback when I tap it, but there's a problem.</p>
  
  <p>The outline of the rounded rectangle shape was lost. It still draws the white rounded rectangle fine, but the shadow is cast as a non-rounded rectangle (square edges), and the ripple goes all the way out past the corners:</p>
  
  <p><img src="https://i.stack.imgur.com/Wj9aN.png" alt="Bad corners"></p>
  
  <p>It doesn't look too horrible on here, but on the device it's pretty ugly and off-putting.</p>
  
  <p>Is there a way to fix this? The <code>Outline</code> section of the first link seems to be what I want, but I can't figure out how to implement it.</p>