I understand that there is supposed to be a white padding on pre-lollipop devices to support corner radius but I am testing on a Lollipop device and my cardview has a padding. Please see the code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/llFeedItemCardTheme"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/cvFeedItem"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginBottom="-2dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:background="#FFFFFF"
card_view:cardCornerRadius="6dp"
card_view:cardElevation="2dp"
card_view:cardUseCompatPadding="true">
<TextView
android:id="@+id/tvFeedJoke"
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:padding="10dp"
android:text="Being Human t shirt"
android:textAllCaps="false"
android:textAppearance="?android:attr/textAppearanceLarge" />
</android.support.v7.widget.CardView>
</LinearLayout>
I am also attaching a screenshot. Please note that I don't want to use card_view:cardPreventCornerOverlap="false" because I don't want to lose rounded corners.
See the image below, when I touch the textview the effect shows that there is a padding.