<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/custom_margin"
        android:layout_marginRight="@dimen/custom_margin"
        android:layout_marginTop="@dimen/custom_margin"
        card_view:cardBackgroundColor="@color/white"
        card_view:cardCornerRadius="10dp">

        <LinearLayout
            android:id="@+id/parent_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="2"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/tv_checklist"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center_vertical"
                android:paddingLeft="@dimen/custom_margin"
                android:text="Checklist"
                android:textColor="@color/black"
                android:textStyle="bold" />

            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:padding="5dp">

                <ToggleButton
                    android:id="@+id/btn_is_present"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:background="@drawable/toggle_selector_background"
                    android:textOff="@string/no"
                    android:textOn="@string/yes" />

            </RelativeLayout>

        </LinearLayout>

    </androidx.cardview.widget.CardView>

</LinearLayout>