<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    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:id="@+id/toast_container">

    <RelativeLayout
        android:id="@+id/button_parent"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.cardview.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginTop="24dp"
            android:layout_marginRight="16dp"
            app:cardBackgroundColor="#FF6C6C"
            app:cardCornerRadius="30dp">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <TextView
                    android:id="@+id/toast_text"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginStart="32dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginEnd="32dp"
                    android:layout_marginBottom="16dp"
                    android:ellipsize="end"
                    android:gravity="center"
                    android:text="This is a custom Toast"
                    android:textColor="#131313"
                    android:textSize="20sp"
                    android:textStyle="normal"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />
            </androidx.constraintlayout.widget.ConstraintLayout>
        </androidx.cardview.widget.CardView>

    </RelativeLayout>

</RelativeLayout>