I am using Recycler view + card view to show my content but there is unnecessary space between cards how to remove it. I have tried with negative padding but didnt work. Any other solution to this? or there is any bug in my code.
my RecyclerView
<android.support.v7.widget.RecyclerView
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:id="@+id/reyclerview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/darker_gray"
android:scrollbars="vertical" />
cardview
<?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="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/tools"
app:cardCornerRadius="4dp"
card_view:cardElevation="0dp"
card_view:cardUseCompatPadding="true"
card_view:cardPreventCornerOverlap="false"
android:background="@color/background">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_marginStart="4dp">
//Some Items
</RelativeLayout>
here is the preview of space