I am new to android studio and XML I have a cardview that is blocking my recyclerview. At first I thought it was not working ,but once I took the card view out I could see the recycler.
What i need help on is so that my recylcer view start right below my cardview not matter how long the cardview gets.
XML CODE:
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.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"
tools:context=".HomeReplies"
android:background="#FF9D9D">
<androidx.cardview.widget.CardView
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp">
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profilePic"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true" />
<TextView
android:id="@+id/userName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/profilePic"
android:maxLines="1"
android:text="userName"
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
<TextView
android:id="@+id/post"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/userName"
android:layout_toRightOf="@+id/profilePic"
android:text="test" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycle"
android:layout_width="344dp"
android:layout_height="601dp"
android:layout_below="@+id/cardView"
android:layout_marginLeft="25dp"
android:layout_marginTop="100dp"
android:layout_marginRight="25dp"
android:layout_marginBottom="50dp" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>