<?xml version="1.0" encoding="utf-8"?>
<!-- Set nextFocusLeft so switch functionality is maintained in rtl layouts -->
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/root"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:clickable="true"
    android:background="?android:attr/selectableItemBackground"
    android:nextFocusLeft="@id/cheat_switch">

    <TextView
        android:id="@+id/text_name"
        style="@style/TextAppearance.MaterialComponents.Headline5"
        android:layout_width="wrap_content"
        android:layout_height="76dp"
        android:layout_alignParentStart="true"
        android:layout_centerVertical="true"
        android:layout_marginEnd="@dimen/spacing_large"
        android:layout_marginStart="@dimen/spacing_large"
        android:layout_toStartOf="@+id/cheat_switch"
        android:gravity="center_vertical|start"
        android:textAlignment="viewStart"
        android:textSize="16sp"
        tools:text="Hyrule Field Speed Hack" />

    <com.google.android.material.materialswitch.MaterialSwitch
        android:id="@+id/cheat_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_centerVertical="true"
        android:layout_marginEnd="24dp"
        android:focusable="true"
        android:nextFocusRight="@id/root" />

</RelativeLayout>
