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.
263 lines
9.2 KiB
XML
263 lines
9.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout 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">
|
|
|
|
<data>
|
|
|
|
<variable
|
|
name="title"
|
|
type="String" />
|
|
|
|
<variable
|
|
name="visibState"
|
|
type="androidx.databinding.ObservableBoolean" />
|
|
|
|
<import type="android.view.View" />
|
|
|
|
<variable
|
|
name="adapter"
|
|
type="com.example.as_trak.adapter.CargoInfoAdapter" />
|
|
|
|
<variable
|
|
name="list1"
|
|
type="java.util.List" />
|
|
|
|
<variable
|
|
name="list2"
|
|
type="java.util.List" />
|
|
|
|
|
|
<variable
|
|
name="qty1"
|
|
type="androidx.databinding.ObservableInt" />
|
|
|
|
<variable
|
|
name="qty2"
|
|
type="androidx.databinding.ObservableInt" />
|
|
|
|
</data>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:animateLayoutChanges="true"
|
|
android:orientation="vertical"
|
|
tools:context=".LoadMainActivity">
|
|
|
|
<include
|
|
layout="@layout/toolbar"
|
|
app:title='@{title??"行李装载"}' />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="81dp"
|
|
android:layout_marginTop="12dp"
|
|
android:background="@drawable/main_menu_bg">
|
|
|
|
<TextView
|
|
android:layout_width="82dp"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:text="航班号"
|
|
android:textSize="18sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/load_main_flight_code"
|
|
android:layout_width="0dp"
|
|
android:layout_height="38dp"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
android:background="@drawable/select_bg"
|
|
android:gravity="center"
|
|
android:paddingEnd="10dp"
|
|
android:textSize="18sp"
|
|
app:drawableRightCompat="@mipmap/ic_select"
|
|
tools:ignore="RtlSymmetry" />
|
|
|
|
<ImageButton
|
|
android:layout_width="50dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginEnd="0dp"
|
|
android:background="@color/white"
|
|
android:onClick="loadAddFlight"
|
|
android:src="@mipmap/icon_add" />
|
|
</LinearLayout>
|
|
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="51dp"
|
|
android:layout_marginTop="8dp"
|
|
android:background="@drawable/main_menu_bg">
|
|
|
|
<Spinner
|
|
android:id="@+id/load_main_cargo_code0"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:entries="@{list1}"
|
|
android:textAlignment="center"
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}" />
|
|
|
|
<EditText
|
|
android:id="@+id/load_main_cargo_code"
|
|
android:layout_width="0dp"
|
|
android:layout_height="45dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_weight="1"
|
|
android:background="@drawable/select_bg"
|
|
android:gravity="center"
|
|
android:inputType="text"
|
|
android:maxLines="1"
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}" />
|
|
|
|
<Spinner
|
|
android:id="@+id/load_main_cargo_code2"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:entries="@{list2}"
|
|
android:textAlignment="center"
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}" />
|
|
|
|
<TextView
|
|
android:layout_width="55dp"
|
|
android:layout_height="30dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginStart="5dp"
|
|
android:background="@drawable/button_add"
|
|
android:gravity="center"
|
|
android:onClick="loadAddCargo"
|
|
android:text="添加"
|
|
android:textColor="@color/white"
|
|
android:textSize="15sp"
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}" />
|
|
|
|
<ImageButton
|
|
android:layout_width="40dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginEnd="5dp"
|
|
android:background="@color/white"
|
|
android:onClick="loadCloseEdit"
|
|
android:src="@mipmap/icon_left"
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="51dp"
|
|
android:layout_marginStart="10dp"
|
|
android:gravity="center"
|
|
android:onClick="loadAddEdit"
|
|
android:text="装载单元信息"
|
|
android:textSize="18sp"
|
|
android:visibility="@{visibState?View.VISIBLE:View.GONE}"
|
|
app:drawableEndCompat="@mipmap/icon_right" />
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_marginTop="1dp"
|
|
android:layout_weight="1"
|
|
android:adapter="@{adapter}"
|
|
android:background="@drawable/main_menu_bg"
|
|
android:padding="10dp"
|
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="40dp"
|
|
android:layout_marginTop="1dp"
|
|
android:background="@drawable/main_menu_bg">
|
|
|
|
<TextView
|
|
android:layout_width="82dp"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:text="结柜数量:"
|
|
android:textSize="16sp" />
|
|
|
|
<EditText
|
|
android:id="@+id/load_main_jieguiQty"
|
|
android:layout_width="80dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center"
|
|
android:background="@drawable/select_bg"
|
|
android:gravity="center"
|
|
android:inputType="number"
|
|
|
|
android:maxLines="1" />
|
|
|
|
<TextView
|
|
android:layout_width="55dp"
|
|
android:layout_height="30dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginStart="5dp"
|
|
android:background="@drawable/button_add"
|
|
android:gravity="center"
|
|
android:onClick="saveNumber"
|
|
android:text="保存"
|
|
android:textColor="@color/white"
|
|
android:textSize="15sp" />
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:text="总装载单元数量:"
|
|
android:textSize="16sp" />
|
|
|
|
<TextView
|
|
android:layout_width="50dp"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:text="@{String.valueOf(qty1)}" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="40dp"
|
|
android:layout_marginTop="1dp"
|
|
android:background="@drawable/main_menu_bg">
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:text="已装载行李数量:"
|
|
android:textSize="16sp" />
|
|
|
|
<TextView
|
|
android:layout_width="50dp"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:text="@{String.valueOf(qty2)}" />
|
|
</LinearLayout>
|
|
|
|
|
|
<Button
|
|
android:layout_width="match_parent"
|
|
android:layout_height="48dp"
|
|
android:layout_margin="12dp"
|
|
android:letterSpacing="0.5"
|
|
android:onClick="clickCargoInfo"
|
|
android:text="装载行李"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold" />
|
|
</LinearLayout>
|
|
</layout> |