Problem Short Version:
I want my CardView and RecyclerView to be transparent, so the fragment / activity background should be visible.
Explanations:
I have an action A with a background image, and fragment B is replaced with Framelayout , in fragment B I have a recyclerView , which now with the CardView problem is that I want to make each transparent background, so that only the CardView will be visible with the actual activity background
RecyclerView looks like this (this white background should be transparent):

The code
activity (A)
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:backgroundTint="@android:color/transparent"/>
Fragment (B) RecyclerView
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="@android:color/transparent"
android:background="@android:color/transparent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv"
tools:listitem="@layout/layout_video_item"
android:backgroundTint="@android:color/transparent"
android:background="@android:color/transparent"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<TextView
android:id="@+id/tv_not_found"
android:text="No Media Found Yet"
android:layout_gravity="center"
android:gravity="center"
android:visibility="gone"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.CoordinatorLayout>
Chartplay / position layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="3dp"
android:layout_marginStart="3dp"
android:layout_marginTop="3dp"
android:background="@android:color/transparent">
<android.support.v7.widget.CardView
style="@style/CardView.Light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardUseCompatPadding="true"
android:background="@android:color/transparent"
android:backgroundTint="@android:color/transparent"
app:cardCornerRadius="5dp"
android:padding="0dp"
app:cardElevation="0dp"
tools:ignore="ContentDescription">
<android.support.constraint.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:background="@color/colorAccent">
<ImageView
android:id="@+id/media_image"
android:layout_width="100dp"
android:layout_height="0dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@android:color/darker_gray" />
<ImageButton
android:id="@+id/ib_delete"
android:layout_width="30dp"
android:layout_height="40dp"
android:background="#00FFFFFF"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_delete_white_24dp" />
<ImageButton
android:id="@+id/share_button"
android:layout_width="30dp"
android:layout_height="40dp"
android:background="#00FFFFFF"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/ib_delete"
app:srcCompat="@drawable/ic_share_white_24dp" />
<TextView
android:id="@+id/tv_video_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:ellipsize="marquee"
android:singleLine="true"
android:text="Title Test"
android:textAppearance="@style/TextAppearance.AppCompat.Large.Inverse"
android:textColor="@color/colorPrimaryText"
app:layout_constraintEnd_toStartOf="@+id/tv_ribbon"
app:layout_constraintStart_toEndOf="@+id/media_image"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_ribbon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/holo_red_light"
android:ellipsize="marquee"
android:fontFamily="monospace"
android:padding="3dp"
android:singleLine="true"
android:text="New"
android:textColor="@color/colorIcons"
android:textSize="14sp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_path"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="5dp"
android:ellipsize="marquee"
android:singleLine="true"
android:text="subtitle test"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/media_image"
app:layout_constraintTop_toBottomOf="@+id/tv_video_name" />
<ImageView
android:id="@+id/iv_is_audio"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="5dp"
android:layout_marginTop="8dp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/media_image"
app:layout_constraintTop_toBottomOf="@+id/tv_duration"
app:srcCompat="@drawable/ic_settings_voice_black_24dp" />
<ImageView
android:id="@+id/iv_is_video"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginStart="5dp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@+id/iv_is_audio"
app:layout_constraintStart_toEndOf="@+id/iv_is_audio"
app:layout_constraintTop_toTopOf="@+id/iv_is_audio"
app:srcCompat="@drawable/ic_theaters" />
<ImageView
android:id="@+id/iv_is_gif"
android:layout_width="35dp"
android:layout_height="30dp"
android:layout_marginStart="5dp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@+id/iv_is_video"
app:layout_constraintStart_toEndOf="@+id/iv_is_video"
app:layout_constraintTop_toTopOf="@+id/iv_is_video"
app:srcCompat="@drawable/ic_gif" />
<TextView
android:id="@+id/tv_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="8dp"
android:text="0:00"
app:layout_constraintStart_toEndOf="@+id/media_image"
app:layout_constraintTop_toBottomOf="@+id/tv_path" />
<TextView
android:id="@+id/tv_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="0 MB"
app:layout_constraintBottom_toBottomOf="@+id/tv_duration"
app:layout_constraintStart_toEndOf="@+id/tv_duration"
app:layout_constraintTop_toTopOf="@+id/tv_duration" />
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
Reason for question:
, SO, , , - .