<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/rumble_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:animateLayoutChanges="true"
    android:defaultFocusHighlightEnabled="false"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:focusedByDefault="true"
    android:orientation="vertical"
    android:padding="16dp">

    <TextView
        android:id="@+id/rumble_title"
        style="?attr/textAppearanceBodyLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:animateLayoutChanges="true"
        android:text="@string/press_any_button"
        android:textAlignment="center" />

    <RelativeLayout
        android:id="@+id/rumble_controller"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="10dp"
        android:animateLayoutChanges="true"
        android:gravity="center_horizontal">

        <ImageView
            android:id="@+id/rumble_controller_icon"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:alpha="0.25"
            android:contentDescription="@string/controller"
            android:src="@drawable/ic_controller" />

        <TextView
            android:id="@+id/rumble_controller_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/rumble_controller_icon"
            android:layout_marginStart="10dp"
            android:layout_marginTop="4dp"
            android:layout_toEndOf="@id/rumble_controller_icon"
            android:textAppearance="?android:attr/textAppearanceListItem"
            android:textSize="15sp" />

        <TextView
            android:id="@+id/rumble_controller_supported"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/rumble_controller_name"
            android:layout_alignStart="@id/rumble_controller_name"
            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
            android:textColor="@android:color/tertiary_text_light"
            android:textSize="13sp" />
    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="end"
        android:orientation="horizontal">

        <Button
            android:id="@+id/rumble_reset"
            style="@style/Widget.Material3.Button.TonalButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="10dp"
            android:text="@string/reset" />

        <Button
            android:id="@+id/rumble_builtin"
            style="@style/Widget.Material3.Button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="10dp"
            android:text="@string/builtin"
            android:visibility="gone"
            tools:visibility="visible" />
    </LinearLayout>
</LinearLayout>
