diff --git a/app/src/main/java/com/example/as_trak/LoadMainActivity.java b/app/src/main/java/com/example/as_trak/LoadMainActivity.java index 485788e..4bba135 100644 --- a/app/src/main/java/com/example/as_trak/LoadMainActivity.java +++ b/app/src/main/java/com/example/as_trak/LoadMainActivity.java @@ -1,11 +1,13 @@ package com.example.as_trak; -import androidx.activity.result.contract.ActivityResultContracts; import androidx.annotation.Nullable; import androidx.databinding.DataBindingUtil; import androidx.databinding.ObservableBoolean; +import androidx.databinding.ObservableInt; import android.annotation.SuppressLint; +import android.app.AlertDialog; +import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.util.Log; @@ -23,13 +25,13 @@ import com.example.as_trak.entity.CargoInfo; import com.example.as_trak.entity.ContainerType; import com.example.as_trak.entity.FlightInfo; import com.example.as_trak.entity.LoadOperation; -import com.example.as_trak.toast.LoadToast; import org.litepal.LitePal; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; public class LoadMainActivity extends BaseActivity implements AddFlightDialog.AddFlightDialogCall, CargoInfoAdapter.CargoInfoCall, AdapterView.OnItemClickListener { private ObservableBoolean visibState; @@ -40,8 +42,9 @@ public class LoadMainActivity extends BaseActivity implements AddFlightDialog.Ad private CargoInfoAdapter cargoInfoAdapter; private List cargoInfoList; private FlightInfoAdapter adapter; - private ActivityLoadMainBinding binding; + private ObservableInt cargoQty; + private ObservableInt loadQty; @Override protected void onCreate(Bundle savedInstanceState) { @@ -53,7 +56,20 @@ public class LoadMainActivity extends BaseActivity implements AddFlightDialog.Ad // 装载器适配 cargoInfoAdapter = new CargoInfoAdapter(this, this); binding.setAdapter(cargoInfoAdapter); - // 航班添加框 + initAddFlight(); // 航班添加框 + intent = new Intent(this, LoadScanActivity.class); + initInputCargo(); + cargoQty = new ObservableInt(); + loadQty = new ObservableInt(); + binding.setQty1(cargoQty); + binding.setQty2(loadQty); + builder = new AlertDialog.Builder(this); + builder.setTitle("删除确认").setMessage("是否确定删除装载单元").setNegativeButton("取消", null); + + } + + // 初始化航班添加 + private void initAddFlight() { addFlightDialog = new AddFlightDialog(this); addFlightDialog.setCall(this); // 航班选择框 @@ -68,12 +84,13 @@ public class LoadMainActivity extends BaseActivity implements AddFlightDialog.Ad binding.loadMainFlightCode.setOnClickListener(v -> { lpw.show(); }); - intent = new Intent(this, LoadScanActivity.class); - + } + // 初始化添加货箱 + private void initInputCargo() { List list = LitePal.findAll(ContainerType.class); Log.e("TAG", "onCreate:" + list.toString()); - if (list!=null){ + if (list != null) { int size = list.size(); List list1 = new ArrayList<>(size); List list2 = new ArrayList<>(size); @@ -87,10 +104,8 @@ public class LoadMainActivity extends BaseActivity implements AddFlightDialog.Ad binding.setList1(list1); binding.setList2(list2); } - } - // 显示航班添加框 public void loadAddFlight(View view) { addFlightDialog.show(); @@ -102,15 +117,15 @@ public class LoadMainActivity extends BaseActivity implements AddFlightDialog.Ad } // 添加货箱 + @SuppressLint("NotifyDataSetChanged") public void loadAddCargo(View view) { - if (flightInfoTag == null) { - return; - } + if (flightInfoTag == null) return; String cargoCode = binding.loadMainCargoCode.getText().toString(); - if (cargoCode.isEmpty()) { - return; - } + if (cargoCode.isEmpty()) return; + String cargoCode0 = binding.loadMainCargoCode0.getSelectedItem().toString(); + String cargoCode2 = binding.loadMainCargoCode2.getSelectedItem().toString(); int id = flightInfoTag.getId(); + cargoCode = cargoCode0 + cargoCode + cargoCode2; int countTag = LitePal.where("cargoCode= ? and flightId=?", cargoCode, String.valueOf(id)).count(CargoInfo.class); if (countTag > 0) { Toast.makeText(this, "装载单元已经绑定", Toast.LENGTH_SHORT).show(); @@ -121,13 +136,18 @@ public class LoadMainActivity extends BaseActivity implements AddFlightDialog.Ad cargoInfo.setCargoCode(cargoCode); cargoInfo.setFlightId(id); cargoInfo.setState("未装载"); + // cargoInfo.setLoadState("C0"); cargoInfo.save(); cargoInfoList.add(cargoInfo); cargoInfoAdapter.notifyDataSetChanged(); + cargoQty.set(cargoInfoList.size()); binding.loadMainCargoCode.setText(null); Toast.makeText(this, "绑定成功", Toast.LENGTH_SHORT).show(); } - + public void saveNumber(View view) { + flightInfoTag.setJieguiQty(binding.loadMainJieguiQty.getText().toString()); + flightInfoTag.update(flightInfoTag.getId()); + } // 关闭货箱添加 public void loadCloseEdit(View view) { visibState.set(true); @@ -156,50 +176,37 @@ public class LoadMainActivity extends BaseActivity implements AddFlightDialog.Ad adapter.notifyDataSetChanged(); } -/* - @Override - public void sanCodeResult(String code) { - super.sanCodeResult(code); - Log.e("TAG", "sanCodeResult:" + code); - }*/ - @Override - public void updateCargoInfo(int index) { - // CargoInfo cargoInfo = cargoInfoList.get(index); - // cargoInfoAdapter.notifyDataSetChanged(); - } + // 长按删除 + private AlertDialog.Builder builder; + @SuppressLint("NotifyDataSetChanged") @Override - public void deleteCargoInfo(int index) { + public void longClickCargoInfo(int index) { CargoInfo cargoInfo = cargoInfoList.get(index); if (!cargoInfo.getState().equals("待装载")) { Toast.makeText(this, "已经装载行李,不能删除", Toast.LENGTH_SHORT).show(); return; } - cargoInfo.delete(); - cargoInfoList.remove(index); - cargoInfoAdapter.notifyDataSetChanged(); - } - private Intent intent; + builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + cargoInfo.delete(); + cargoInfoList.remove(index); + cargoInfoAdapter.notifyDataSetChanged(); + Toast.makeText(LoadMainActivity.this, "删除完成", Toast.LENGTH_SHORT).show(); + } + }).show(); + - public void clickCargoInfo(View view) { - if (flightInfoTag == null) { - Toast.makeText(this, "没有选择航班", Toast.LENGTH_SHORT).show(); - return; - } - if (cargoInfoList == null || cargoInfoList.isEmpty()) { - Toast.makeText(this, "没有添加装载单元", Toast.LENGTH_SHORT).show(); - return; - } - intent.putExtra("id", flightInfoTag.getId()); - startActivityForResult(intent, 0); } // 选中航班 @Override public void onItemClick(AdapterView parent, View view, int position, long id) { flightInfoTag = flightList.get(position); + binding.loadMainJieguiQty.setText(flightInfoTag.getJieguiQty()); // 添加输入框 binding.loadMainFlightCode.setText(flightInfoTag.getFlightCode()); // 查询货框 @@ -219,15 +226,32 @@ public class LoadMainActivity extends BaseActivity implements AddFlightDialog.Ad private void selectCargo() { cargoInfoList = LitePal.where("flightId = ? ", String.valueOf(flightInfoTag.getId())).find(CargoInfo.class); + AtomicInteger tag = new AtomicInteger(); if (!cargoInfoList.isEmpty()) { cargoInfoList.forEach(cargoInfo -> { int countNum = LitePal.where("cargoId = ? and type ='正常' and (state IS NULL or state = '修改')", String.valueOf(cargoInfo.getId())).count(LoadOperation.class); cargoInfo.setCount(countNum); + tag.addAndGet(countNum); }); } - - + cargoQty.set(cargoInfoList.size()); + loadQty.set(tag.intValue()); cargoInfoAdapter.setList(cargoInfoList); cargoInfoAdapter.notifyDataSetChanged(); } + + private Intent intent; // 跳转扫描界面 + + public void clickCargoInfo(View view) { + if (flightInfoTag == null) { + Toast.makeText(this, "没有选择航班", Toast.LENGTH_SHORT).show(); + return; + } + if (cargoInfoList == null || cargoInfoList.isEmpty()) { + Toast.makeText(this, "没有添加装载单元", Toast.LENGTH_SHORT).show(); + return; + } + intent.putExtra("id", flightInfoTag.getId()); + startActivityForResult(intent, 0); + } } \ No newline at end of file diff --git a/app/src/main/java/com/example/as_trak/LoadScanActivity.java b/app/src/main/java/com/example/as_trak/LoadScanActivity.java index 80dfbf2..fb3edd2 100644 --- a/app/src/main/java/com/example/as_trak/LoadScanActivity.java +++ b/app/src/main/java/com/example/as_trak/LoadScanActivity.java @@ -1,13 +1,17 @@ package com.example.as_trak; import androidx.annotation.RequiresApi; +import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import androidx.databinding.DataBindingUtil; import android.annotation.SuppressLint; +import android.content.DialogInterface; +import android.content.res.Resources; import android.os.Build; import android.os.Bundle; import android.util.Log; +import android.view.PixelCopy; import android.view.View; import android.widget.Toast; @@ -27,22 +31,21 @@ import java.time.LocalTime; import java.time.format.DateTimeFormatter; import java.util.List; -public class LoadScanActivity extends BaseActivity implements CargoListAdapter.CargoInfoCall, LoadInfoAdapter.LoadInfoCall { +public class LoadScanActivity extends BaseActivity implements CargoListAdapter.CargoInfoCall, LoadInfoAdapter.LoadInfoCall, View.OnLongClickListener { private List cargoInfoList; private CargoListAdapter adapter; private List loadOperations; private CargoInfo cargoInfoTag; private FlightInfo flightInfo; private LoadToast loadToast; - private LoadInfoAdapter loadInfoAdapter; // 定义时间格式 private DateTimeFormatter formatter; - - private UpdataDialog updataDialog; + // 装载完成对话框 + private AlertDialog.Builder alertDialog; + private String[] loadStateList; - @RequiresApi(api = Build.VERSION_CODES.O) @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -60,6 +63,13 @@ public class LoadScanActivity extends BaseActivity implements CargoListAdapter.C loadToast = new LoadToast(this); loadInfoAdapter = new LoadInfoAdapter(this, this); binding.setAdapter2(loadInfoAdapter); + binding.loadScanSubmit.setOnLongClickListener(this); + initDialog(); + } + // 初始化弹窗 + @SuppressLint("NotifyDataSetChanged") + private void initDialog() { + loadStateList = getResources().getStringArray(R.array.loadState); updataDialog = new UpdataDialog(this); updataDialog.setUpdataDialogCall((code, index) -> { LoadOperation loadOperation = loadOperations.get(index); @@ -69,11 +79,27 @@ public class LoadScanActivity extends BaseActivity implements CargoListAdapter.C loadOperation.update(loadOperation.getId()); loadInfoAdapter.notifyDataSetChanged(); }); + alertDialog = new AlertDialog.Builder(this); + alertDialog.setTitle("装载完成,选择装载量") + // .setIcon(R.mipmap.ic_launcher) + .setItems(loadStateList, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + Toast.makeText(LoadScanActivity.this,"装载完成" , Toast.LENGTH_SHORT).show(); + cargoInfoTag.setState("装载完成"); + cargoInfoTag.update(cargoInfoTag.getId()); + cargoInfoTag.setLoadState(loadStateList[which]); + adapter.notifyDataSetChanged(); + cargoInfoTag = null; + + } + }).setNegativeButton("取消", null).create(); + + } // 扫码结果 @SuppressLint("NotifyDataSetChanged") - @RequiresApi(api = Build.VERSION_CODES.O) @Override public void sanCodeResult(String code) { super.sanCodeResult(code); @@ -81,9 +107,7 @@ public class LoadScanActivity extends BaseActivity implements CargoListAdapter.C Toast.makeText(this, "没有选择装载单元", Toast.LENGTH_SHORT).show(); return; } - - int count = LitePal.where("flightId= ? and luggageCode=? and (state IS NULL or state = '修改') ", - String.valueOf(flightInfo.getId()), code).count(LoadOperation.class); + int count = LitePal.where("flightId= ? and luggageCode=? and (state IS NULL or state = '修改') ", String.valueOf(flightInfo.getId()), code).count(LoadOperation.class); if (count > 0) { loadToast.show("行李条码重复"); return; @@ -99,11 +123,10 @@ public class LoadScanActivity extends BaseActivity implements CargoListAdapter.C // loadOperation.setUser(); String formattedTime = LocalTime.now().format(formatter); // 格式化当前时间 loadOperation.setLoadTime(formattedTime); - loadOperation.setType("正常"); + loadOperation.setType("装载"); loadOperation.save(); loadOperations.add(loadOperation); loadInfoAdapter.notifyDataSetChanged(); - int size = loadOperations.size(); Log.e("TAG", "更新的id:" + cargoInfoTag.getId() + "数量:" + size); cargoInfoTag.setCount(size); @@ -115,12 +138,9 @@ public class LoadScanActivity extends BaseActivity implements CargoListAdapter.C // 点击箱子 @Override public void clickCargoInfo(int index) { - cargoInfoTag = cargoInfoList.get(index); // Log.e("TAG", "clickCargoInfo:" + cargoInfoTag.toString()); - loadOperations = LitePal.where("cargoId =? and type = ? and (state IS NULL or state = '修改') ", - String.valueOf(cargoInfoTag.getId()), "正常") - .find(LoadOperation.class); + loadOperations = LitePal.where("cargoId =? and type = ? and (state IS NULL or state = '修改') ", String.valueOf(cargoInfoTag.getId()), "正常").find(LoadOperation.class); loadInfoAdapter.setList(loadOperations); loadInfoAdapter.notifyDataSetChanged(); } @@ -143,7 +163,6 @@ public class LoadScanActivity extends BaseActivity implements CargoListAdapter.C loadOperation.setState("删除"); loadOperation.update(loadOperation.getId()); loadOperations.remove(index); - cargoInfoTag.setCount(loadOperations.size()); cargoInfoTag.update(cargoInfoTag.getId()); loadInfoAdapter.notifyDataSetChanged(); @@ -151,20 +170,21 @@ public class LoadScanActivity extends BaseActivity implements CargoListAdapter.C public void loadOverupdate(View view) { - CargoInfo cargoInfo=new CargoInfo(); + CargoInfo cargoInfo = new CargoInfo(); cargoInfo.setState("装载中"); cargoInfo.updateAll(); + } + // 装载完毕 + @Override @SuppressLint("NotifyDataSetChanged") - public void loadOver(View view) { + public boolean onLongClick(View v) { if (cargoInfoTag == null) { - return; + return false; } - cargoInfoTag.setState("装载完成"); - cargoInfoTag.update(cargoInfoTag.getId()); - adapter.notifyDataSetChanged(); - cargoInfoTag = null; + alertDialog.show(); + return true; } } \ No newline at end of file diff --git a/app/src/main/java/com/example/as_trak/adapter/CargoInfoAdapter.java b/app/src/main/java/com/example/as_trak/adapter/CargoInfoAdapter.java index 5a12b54..e0a1bdb 100644 --- a/app/src/main/java/com/example/as_trak/adapter/CargoInfoAdapter.java +++ b/app/src/main/java/com/example/as_trak/adapter/CargoInfoAdapter.java @@ -20,10 +20,11 @@ public class CargoInfoAdapter extends RecyclerView.Adapter list; private CargoInfoCall call; - public CargoInfoAdapter(Context context,CargoInfoCall call) { + + public CargoInfoAdapter(Context context, CargoInfoCall call) { this.context = context; - inflater=LayoutInflater.from(context); - this.call=call; + inflater = LayoutInflater.from(context); + this.call = call; } public void setList(List list) { @@ -41,9 +42,12 @@ public class CargoInfoAdapter extends RecyclerView.Adapter call.deleteCargoInfo(position)); - binding.itemCargoU.setOnClickListener(v -> call.updateCargoInfo(position)); - // binding.itemCargoC.setOnClickListener(v -> call.clickCargoInfo(position)); + // binding.itemCargoD.setOnClickListener(v -> call.deleteCargoInfo(position)); + // binding.itemCargoU.setOnClickListener(v -> call.updateCargoInfo(position)); + binding.itemCargoC.setOnLongClickListener(v -> { + call.longClickCargoInfo(position); + return true; + }); } @Override @@ -64,8 +68,7 @@ public class CargoInfoAdapter extends RecyclerView.Adapter list; private CargoInfoCall call; private List bgList; - private int tag=-1; + private int tag = -1; + public CargoListAdapter(Context context, CargoInfoCall call) { this.context = context; - inflater=LayoutInflater.from(context); - this.call=call; + inflater = LayoutInflater.from(context); + this.call = call; } public void setList(List list) { @@ -39,7 +40,7 @@ public class CargoListAdapter extends RecyclerView.Adapter(size); + bgList = new ArrayList<>(size); for (int i = 0; i < size; i++) { bgList.add(false); } @@ -58,31 +59,27 @@ public class CargoListAdapter extends RecyclerView.Adapter { - if (tag!=-1){ - bgList.set(tag,false); + if (tag != -1) { + bgList.set(tag, false); notifyItemChanged(tag); - Log.e("TAG", "上次点击:" +tag ); + Log.e("TAG", "上次点击:" + tag); } - bgList.set(position,true); + bgList.set(position, true); call.clickCargoInfo(position); - tag=position; + tag = position; notifyItemChanged(position); - Log.e("TAG", "本次点击:" +position ); + Log.e("TAG", "本次点击:" + position); }); } diff --git a/app/src/main/java/com/example/as_trak/entity/CargoInfo.java b/app/src/main/java/com/example/as_trak/entity/CargoInfo.java index e43727c..072c04d 100644 --- a/app/src/main/java/com/example/as_trak/entity/CargoInfo.java +++ b/app/src/main/java/com/example/as_trak/entity/CargoInfo.java @@ -17,9 +17,20 @@ public class CargoInfo extends LitePalSupport { * 装载状态 */ private String state; + // 装载量 + private String loadState; private int count; + + public String getLoadState() { + return loadState; + } + + public void setLoadState(String loadState) { + this.loadState = loadState; + } + public int getCount() { return count; } diff --git a/app/src/main/java/com/example/as_trak/entity/FlightInfo.java b/app/src/main/java/com/example/as_trak/entity/FlightInfo.java index f34e7a7..3800d9e 100644 --- a/app/src/main/java/com/example/as_trak/entity/FlightInfo.java +++ b/app/src/main/java/com/example/as_trak/entity/FlightInfo.java @@ -31,6 +31,17 @@ public class FlightInfo extends LitePalSupport { */ private Date createTime; + private String jieguiQty; + + public String getJieguiQty() { + return jieguiQty; + } + + public void setJieguiQty(String jieguiQty) { + this.jieguiQty = jieguiQty; + + } + public int getId() { return id; } diff --git a/app/src/main/java/com/example/as_trak/fragment/LuggageFragment.java b/app/src/main/java/com/example/as_trak/fragment/LuggageFragment.java index 0b7194e..081e67d 100644 --- a/app/src/main/java/com/example/as_trak/fragment/LuggageFragment.java +++ b/app/src/main/java/com/example/as_trak/fragment/LuggageFragment.java @@ -2,6 +2,7 @@ package com.example.as_trak.fragment; import android.annotation.SuppressLint; import android.app.AlertDialog; +import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; @@ -15,6 +16,7 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; +import android.widget.ListPopupWindow; import android.widget.Toast; import com.example.as_trak.R; @@ -30,18 +32,17 @@ import java.util.stream.IntStream; public class LuggageFragment extends Fragment implements View.OnLongClickListener { - private FragmentLuggageBinding binding; private LuggageBeen luggageBeen; private LoadOperation loadOperationFrist; private AlertDialog.Builder builder; + @SuppressLint("ClickableViewAccessibility") @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - binding = DataBindingUtil.inflate(inflater, R.layout.fragment_luggage, container, false); + FragmentLuggageBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_luggage, container, false); Bundle bundle = this.getArguments(); // 得到从Activity传来的数据 String mess = null; - luggageBeen = new LuggageBeen(); if (bundle != null) { mess = bundle.getString("data"); @@ -49,11 +50,10 @@ public class LuggageFragment extends Fragment implements View.OnLongClickListene luggageBeen.setVisbleState(true); } } - builder = new AlertDialog.Builder(getContext()); + Context context = getContext(); + builder = new AlertDialog.Builder(context); builder.setTitle("拉下确认").setMessage("是否确定拉下行李").setNegativeButton("取消", null); binding.setData(luggageBeen); - - EditText loadMainFlightCode = binding.loadMainFlightCode; loadMainFlightCode.setOnTouchListener((v, event) -> { final int DRAWABLE_RIGHT = 2; @@ -73,17 +73,15 @@ public class LuggageFragment extends Fragment implements View.OnLongClickListene } return false; }); - binding.luggageUnLoad.setOnLongClickListener(this); + return binding.getRoot(); } + // 点击查询 private void selectInfo(String code) { - - loadOperationFrist = LitePal - .where("luggageCode like ? and (state IS NULL or state = '修改')", code+"%") - .order("loadTime desc").findFirst(LoadOperation.class); + loadOperationFrist = LitePal.where("luggageCode like ? and (state IS NULL or state = '修改')", code + "%").order("loadTime desc").findFirst(LoadOperation.class); if (loadOperationFrist == null) { Toast.makeText(getContext(), "查询失败,条码错误", Toast.LENGTH_SHORT).show(); luggageBeen.clear(); @@ -94,17 +92,22 @@ public class LuggageFragment extends Fragment implements View.OnLongClickListene luggageBeen.setState(loadOperationFrist.getType()); luggageBeen.setLoadTime(loadOperationFrist.getLoadTime()); luggageBeen.setLuggageCode(loadOperationFrist.getLuggageCode()); - List loadOperationList = LitePal.where("flightId = ? and cargoId = ? and (state IS NULL or state = '修改') ", String.valueOf(loadOperationFrist.getFlightId()), String.valueOf(loadOperationFrist.getCargoId())).order("id asc").find(LoadOperation.class); - Log.e("TAG", "全部数据:" + loadOperationList.toString()); - FlightInfo flightInfo = LitePal.where("id=?", String.valueOf(loadOperationFrist.getFlightId())).findFirst(FlightInfo.class); + List loadOperationList = + LitePal.where("flightId = ? and cargoId = ? and (state IS NULL or state = '修改') ", + String.valueOf(loadOperationFrist.getFlightId()), String.valueOf(loadOperationFrist.getCargoId())) + .order("id asc").find(LoadOperation.class); + FlightInfo flightInfo = + LitePal.where("id=?", String.valueOf(loadOperationFrist.getFlightId())).findFirst(FlightInfo.class); luggageBeen.setTakeoffDate(flightInfo.getTakeoffDate()); - IntStream.range(0, loadOperationList.size()).filter(i -> loadOperationList.get(i).getLuggageCode().equals(code)).findFirst().ifPresent(i -> luggageBeen.setOrderNum(String.valueOf(i + 1))); + IntStream.range(0, loadOperationList.size()) + .filter(i -> loadOperationList.get(i).getLuggageCode().equals(code)) + .findFirst() + .ifPresent(i -> luggageBeen.setOrderNum(String.valueOf(i + 1))); } - + // 长按按钮弹窗 @Override public boolean onLongClick(View v) { - if (loadOperationFrist == null) { return false; } diff --git a/app/src/main/java/com/example/as_trak/fragment/been/LuggageBeen.java b/app/src/main/java/com/example/as_trak/fragment/been/LuggageBeen.java index 9513211..c3a816b 100644 --- a/app/src/main/java/com/example/as_trak/fragment/been/LuggageBeen.java +++ b/app/src/main/java/com/example/as_trak/fragment/been/LuggageBeen.java @@ -114,11 +114,13 @@ public class LuggageBeen extends BaseObservable { public void clear() { flightCode = null; + luggageCode = null; takeoffTime = null; takeoffDate = null; cargoCode = null; orderNum = null; loadTime = null; + State = null; notifyChange(); } diff --git a/app/src/main/res/layout/activity_load_main.xml b/app/src/main/res/layout/activity_load_main.xml index 4c2c35c..8cebe15 100644 --- a/app/src/main/res/layout/activity_load_main.xml +++ b/app/src/main/res/layout/activity_load_main.xml @@ -8,19 +8,34 @@ + - + + + + + + + + + + + + android:background="@drawable/select_bg" + android:gravity="center" + android:paddingEnd="10dp" + android:textSize="18sp" + app:drawableRightCompat="@mipmap/ic_select" + tools:ignore="RtlSymmetry" /> + + + + + + + + + + + + + + + + + + + + android:padding="10dp" + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> - - - - - + - + - + - - + - - + android:layout_weight="1" /> + + + + + + + + + + + + + +