You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SZXBGJ/app/src/main/res/layout/activity_instorehouse.xml

352 lines
16 KiB
XML

3 weeks ago
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
2 months ago
xmlns:app="http://schemas.android.com/apk/res-auto"
3 weeks ago
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<ScrollView
2 months ago
android:layout_width="match_parent"
3 weeks ago
android:layout_height="match_parent"
android:background="#F5F7FA"
android:padding="8dp">
<LinearLayout
2 months ago
android:layout_width="match_parent"
3 weeks ago
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="#FFFFFF"
android:gravity="center"
android:elevation="4dp"
android:text="轮胎入库管理"
android:textColor="#333333"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginBottom="16dp"
android:padding="8dp" />
<!-- 表单卡片 -->
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="12dp"
app:cardElevation="8dp"
android:layout_marginBottom="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- 第一行EPC + 胎号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="12dp">
<!-- EPC -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginEnd="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EPC"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<!-- 修复:移除了原来的 TextView直接使用 Spinner -->
<TextView
android:id="@+id/EPC"
style="@style/infotext"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:textSize="16sp"
android:hint="请扫描RFID" />
</LinearLayout>
</LinearLayout>
<!-- 胎号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="胎号"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<EditText
android:id="@+id/wtbm"
style="@style/infotext"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:inputType="textVisiblePassword"
android:focusable="true"
android:focusableInTouchMode="true"
android:textSize="16sp"
android:hint="请输入胎号" />
</LinearLayout>
<!-- 第二行:品牌 + 型号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="12dp">
<!-- 品牌 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginEnd="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="品牌"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<!-- 修复:直接使用 Spinner不再叠加 TextView -->
<Spinner
android:id="@+id/spinnerBrand"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:spinnerMode="dropdown" />
</LinearLayout>
<!-- 型号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="型号"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<Spinner
android:id="@+id/spinnerSize"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:spinnerMode="dropdown" />
</LinearLayout>
</LinearLayout>
<!-- 第三行:层级 + 花纹 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="12dp">
<!-- 层级 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginEnd="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="层级"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<Spinner
android:id="@+id/spinnerlevel"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:spinnerMode="dropdown" />
</LinearLayout>
<!-- 花纹 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="花纹"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<Spinner
android:id="@+id/spinnerpattern"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:spinnerMode="dropdown" />
</LinearLayout>
</LinearLayout>
<!-- 第四行:沟槽条数 + 轮胎类别 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="12dp">
<!-- 沟槽条数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginEnd="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="沟槽条数"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<Spinner
android:id="@+id/spinnergcts"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:spinnerMode="dropdown" />
</LinearLayout>
<!-- 轮胎类别 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="轮胎类别"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<Spinner
android:id="@+id/spinnerkind"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:spinnerMode="dropdown" />
</LinearLayout>
</LinearLayout>
<!-- 花纹深度(独立一行) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="花纹深度"
android:textColor="#666666"
android:textSize="12sp"
android:layout_marginStart="4dp" />
<EditText
android:id="@+id/patternDepth"
style="@style/infotext"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/rounded_input_bg"
android:paddingStart="12dp"
android:textSize="16sp"
android:inputType="numberDecimal"
android:hint="请输入花纹深度" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- 操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="24dp">
<Button
android:id="@+id/button"
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_weight="1"
android:layout_marginEnd="8dp"
android:backgroundTint="@color/black"
android:text="轮 胎 入 库"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:elevation="4dp"
style="@style/Widget.MaterialComponents.Button" />
<Button
android:id="@+id/back"
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_weight="1"
android:layout_marginStart="8dp"
android:backgroundTint="@color/black"
android:text="返 回"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:elevation="4dp"
style="@style/Widget.MaterialComponents.Button" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</layout>