I'm implementing a Recycler View in Android to create a list, but for some reason I see a space in between two elements, and I'm not able to pinpoint the error location. As to why is this happening, my guess is on the row element XML.

[![](https://i.imgur.com/pFfJPNP.jpg)](https://i.imgur.com/pFfJPNP.jpg)

```xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cardview1="http://schemas.android.com/apk/res-auto"
android:id="@+id/row_top_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<android.support.v7.widget.CardView
    android:id="@+id/pos_cv"
    android:layout_width="match_parent"
    android:layout_height="72dp"
    android:clickable="true"
    cardview1:cardCornerRadius="6dp"
    cardview1:cardElevation="4dp"
    cardview1:cardMaxElevation="6dp">

    <TextView
        android:id="@+id/manager1"
        android:layout_width="220dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="30dp"
        android:layout_marginTop="15dp"
        android:text="Store Manager/Branch"
        android:textSize="14sp"
        android:textStyle="bold" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:orientation="horizontal">

        <TextView
            android:id="@+id/retail"
            android:layout_width="100dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="30dp"
            android:layout_marginTop="30dp"
            android:text="Abc Retail"
            android:textSize="10sp" />

        <View
            android:layout_width="170dp"
            android:layout_height="match_parent" />

        <TextView
            android:id="@+id/amount"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dp"
            android:text="25,000"
            android:textColor="@color/colorDarkPink"
            android:textSize="14sp"
            android:textStyle="bold" />

    </LinearLayout>

    <TextView
        android:id="@+id/address"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="30dp"
        android:layout_marginTop="50dp"
        android:text="Abc Retail"
        android:textSize="10sp" />

</android.support.v7.widget.CardView>

```

RecyclerView

```xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
    android:id="@+id/list_view_header_ll"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    android:paddingTop="8dp"
    android:paddingBottom="8dp"
    android:weightSum="5"
    android:background="@color/colorDarkPink"
    >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Top 3 Performers"
        android:textStyle="bold"
        android:textColor="@color/colorPrimaryLight"
        android:layout_weight="3"
        android:textSize="16sp"
        android:lines="1"
        />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Sales"
        android:textStyle="bold"
        android:textColor="@color/colorPrimaryLight"
        android:layout_weight="2"
        android:textSize="16sp"
        android:lines="1"
        />

</LinearLayout>

<android.support.v7.widget.RecyclerView
    android:id="@+id/performer_lv"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:divider="@color/colorTransparent"
    android:layout_marginTop="16dp"
    android:dividerHeight="4dp"
    />

```