My code is:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp">
<View
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_gravity="center"
android:background="#00ff00"/>
</android.support.v7.widget.CardView>
My output is
I want to green view to match the whole screen parent width.
Is this possible?
I want to use the card view as a parent, because it will have elevation.