title: Ripple effect on Android Lollipop CardView
body: <p>I'm trying to get a CardView to display the ripple effect when touched by setting the android:backgound attribute in the activity XML file as described <a href="http://developer.android.com/training/material/animations.html" rel="noreferrer">here</a> on the Android Developers page, but it isn't working. No animation at all, but the method in onClick is called. I've also tried creating a ripple.xml file as suggested <a href="https://stackoverflow.com/questions/24527402/android-l-ripple-touch-effect-on-shape">here</a>, but same result.</p>
  <p>The CardView as it appears in the activity's XML file:</p>
  <pre><code>&lt;android.support.v7.widget.CardView
      xmlns:card_view=&quot;http://schemas.android.com/apk/res-auto&quot;
      android:layout_width=&quot;155dp&quot;
      android:layout_height=&quot;230dp&quot;
      android:elevation=&quot;4dp&quot;
      android:translationZ=&quot;5dp&quot;
      android:clickable=&quot;true&quot;
      android:focusable=&quot;true&quot;
      android:focusableInTouchMode=&quot;true&quot;
      android:onClick=&quot;showNotices&quot;
      android:background=&quot;?android:attr/selectableItemBackground&quot;
      android:id=&quot;@+id/notices_card&quot;
      card_view:cardCornerRadius=&quot;2dp&quot;&gt;
  
  &lt;/android.support.v7.widget.CardView&gt; 
  </code></pre>
  <p>I'm relatively new to android development, so I might have made a few obvious mistakes.</p>