|
|
|
<?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" />
|
|
|
|
</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="match_parent"
|
|
|
|
android:layout_height="38dp"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:gravity="center"
|
|
|
|
android:textSize="18sp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:paddingRight="10dp"
|
|
|
|
android:drawableRight="@mipmap/ic_select"
|
|
|
|
android:background="@drawable/select_bg" />
|
|
|
|
|
|
|
|
<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="0dp"
|
|
|
|
android:layout_marginTop="12dp"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:background="@drawable/main_menu_bg"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="51dp">
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:textAlignment="center"
|
|
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}"
|
|
|
|
android:entries="@{list1}"
|
|
|
|
/>
|
|
|
|
<EditText
|
|
|
|
android:id="@+id/load_main_cargo_code"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="45dp"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:background="@drawable/select_bg"
|
|
|
|
android:maxLines="1"
|
|
|
|
android:inputType="text"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}"
|
|
|
|
android:gravity="center" />
|
|
|
|
<Spinner
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:textAlignment="center"
|
|
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}"
|
|
|
|
android:entries="@{list2}"
|
|
|
|
/>
|
|
|
|
<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:text="添加"
|
|
|
|
android:visibility="@{visibState?View.GONE:View.VISIBLE}"
|
|
|
|
android:textColor="@color/white"
|
|
|
|
android:textSize="15sp"
|
|
|
|
android:onClick="loadAddCargo"/>
|
|
|
|
|
|
|
|
<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:visibility="@{visibState?View.GONE:View.VISIBLE}"
|
|
|
|
android:src="@mipmap/icon_left"
|
|
|
|
android:onClick="loadCloseEdit"/>
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="51dp"
|
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:drawableRight="@mipmap/icon_right"
|
|
|
|
android:gravity="center"
|
|
|
|
android:text="装载单元信息"
|
|
|
|
android:visibility="@{visibState?View.VISIBLE:View.GONE}"
|
|
|
|
android:textSize="18sp"
|
|
|
|
android:onClick="loadAddEdit"/>
|
|
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
|
|
<View
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="1dp"
|
|
|
|
android:background="@color/empty_color" />
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:adapter="@{adapter}"
|
|
|
|
android:padding="10dp"
|
|
|
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="48dp"
|
|
|
|
android:text="装载行李"
|
|
|
|
android:textStyle="bold"
|
|
|
|
android:textSize="18sp"
|
|
|
|
android:letterSpacing="0.5"
|
|
|
|
android:onClick="clickCargoInfo"
|
|
|
|
android:layout_margin="12dp"/>
|
|
|
|
</LinearLayout>
|
|
|
|
</layout>
|