app/src/main/res/layout/fragment_research.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/posts_screen"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SearchFragment">
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="Search Fragment"-->
<!-- android:textSize="30sp"-->
<!-- android:layout_centerInParent="true" />-->
<EditText
android:id="@+id/search_posts"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/edit_text_background"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:hint="Search"
android:textColorHint="#000000"
android:inputType="text"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="340dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.492"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/search_posts"
app:layout_constraintVertical_bias="1.0"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"/>
<Button
android:id="@+id/add_posts"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/button_background"
android:text="New Post"
android:textColor="#FFFFFF"
android:textSize="16sp"
android:textAllCaps="false"
android:paddingStart="16dp"
android:paddingEnd="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>