<?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="#F5F5F5"
    tools:context=".MainActivity">

    <!-- 中心卡片容器 -->
    <androidx.cardview.widget.CardView
        android:id="@+id/cardInput"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginEnd="24dp"
        app:cardCornerRadius="16dp"
        app:cardElevation="4dp"
        app:cardBackgroundColor="@android:color/white"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="24dp">

            <!-- 标题提示 (可选) -->
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="轮胎信息录入"
                android:textSize="20sp"
                android:textStyle="bold"
                android:textColor="#333333"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="24dp"/>

            <!-- 输入框 1: 轮胎条码 -->
            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/tilBarcode"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="轮胎条码"
                app:boxStrokeColor="#6200EE"
                app:hintTextColor="#6200EE"
                app:startIconDrawable="@android:drawable/ic_menu_search"
                app:startIconTint="#757575">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/etBarcode"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="text"
                    android:maxLines="1" />
            </com.google.android.material.textfield.TextInputLayout>

            <!-- 间距 -->
            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

            <!-- 输入框 2: 轮胎 RFID -->
            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/tilRfid"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="轮胎 RFID"
                app:boxStrokeColor="#6200EE"
                app:hintTextColor="#6200EE"
                app:startIconDrawable="@android:drawable/ic_dialog_info"
                app:startIconTint="#757575">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/etRfid"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="text"
                    android:maxLines="1" />
            </com.google.android.material.textfield.TextInputLayout>

        </LinearLayout>
    </androidx.cardview.widget.CardView>

    <!-- 底部确定按钮 -->
    <com.google.android.material.button.MaterialButton
        android:id="@+id/btnConfirm"
        android:layout_width="0dp"
        android:layout_height="56dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="24dp"
        android:text="确 定"
        android:textSize="16sp"
        android:textColor="@android:color/white"
        app:cornerRadius="28dp"
        app:backgroundTint="#6200EE"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/cardInput" />

</androidx.constraintlayout.widget.ConstraintLayout>