app/src/main/res/layout/activity_badge_display.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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background">
<ImageView
android:id="@+id/back_button"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:layout_marginTop="60dp"
android:elevation="2dp"
android:onClick="goBack"
android:src="@drawable/back_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/title_leaderboard"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:paddingHorizontal="7dp"
android:fontFamily="@font/poppins_bold"
android:shadowColor="#26000000"
android:shadowDx="0"
android:shadowDy="4"
android:shadowRadius="20"
android:text="Badge Collection"
android:textColor="@color/colorPrimary"
android:textSize="28sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/back_button"
app:layout_constraintStart_toEndOf="@+id/back_button"
app:layout_constraintTop_toTopOf="@+id/back_button" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/badge_collection"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_leaderboard"
android:layout_marginTop="20dp"
android:paddingHorizontal="20dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>