Recyclerview
CardView
remove default Spacing When setting setVisibility
is GONE to particular item
Image One When Item setVisibility
is INVISIBLE
Image Two When Item setVisibility
is GONE
Required Output
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="126dp"
android:layout_marginLeft="8.00dp"
android:layout_marginRight="8.00dp"
android:layout_marginTop="2.00dp"
android:layout_marginBottom="2.00dp"
android:background="@color/white"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:cardUseCompatPadding="true"
android:id="@+id/cardview">
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v7.widget.CardView>