If you use RecyclerView to add CardView, android:layout_margin should be sufficient.
But using ListView to add CardView, you might do this:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="11dp"
android:layout_marginRight="11dp"
android:layout_marginTop="11dp">
(other layout ...)
</android.support.v7.widget.CardView>
</FrameLayout>
But it is usually not the optimal one.