0
0
Переглянути джерело

Merge branch 'master' of lhm/ich-android into master

李慧明 3 роки тому
батько
коміт
731a9301e7
37 змінених файлів з 699 додано та 388 видалено
  1. 1 2
      app/src/main/java/com/emato/ich/MainActivity.java
  2. 2 0
      app/src/main/java/com/emato/ich/api/ICSPApi.java
  3. 4 2
      app/src/main/java/com/emato/ich/api/ICSPResponseCodeEnum.java
  4. 2 2
      app/src/main/java/com/emato/ich/contant/ICSPConstant.java
  5. 1 1
      app/src/main/java/com/emato/ich/contant/SystemConfigConstant.java
  6. 37 12
      app/src/main/java/com/emato/ich/fragment/ChooseCabinetFragment.java
  7. 45 15
      app/src/main/java/com/emato/ich/fragment/ExceptionFragment.java
  8. 2 2
      app/src/main/java/com/emato/ich/fragment/InputInfoFragment.java
  9. 16 9
      app/src/main/java/com/emato/ich/fragment/MainFragment.java
  10. 32 11
      app/src/main/java/com/emato/ich/fragment/SendFragment.java
  11. 1 1
      app/src/main/java/com/emato/ich/fragment/SendInfoConfirmFragment.java
  12. 11 0
      app/src/main/java/com/emato/ich/fragment/SendMainFragment.java
  13. 11 3
      app/src/main/java/com/emato/ich/fragment/SendSuccessFragment.java
  14. 72 9
      app/src/main/java/com/emato/ich/fragment/TakeCodeFragment.java
  15. 9 2
      app/src/main/java/com/emato/ich/fragment/TakeFragment.java
  16. 19 9
      app/src/main/java/com/emato/ich/fragment/TakeSuccessFragment.java
  17. 1 4
      app/src/main/java/com/emato/ich/message/ICHPublishClient.java
  18. 1 2
      app/src/main/java/com/emato/ich/message/ICHSubscribeClient.java
  19. 16 0
      app/src/main/java/com/emato/ich/utils/ButtonUtils.java
  20. 40 0
      app/src/main/java/com/emato/ich/utils/ToastUtils.java
  21. 11 0
      app/src/main/res/drawable/toast_bg.xml
  22. 2 1
      app/src/main/res/layout/activity_main.xml
  23. 17 0
      app/src/main/res/layout/custom_toast.xml
  24. 52 42
      app/src/main/res/layout/fragment_choose_cabinet.xml
  25. 22 20
      app/src/main/res/layout/fragment_exception.xml
  26. 41 39
      app/src/main/res/layout/fragment_input_info.xml
  27. 18 16
      app/src/main/res/layout/fragment_main.xml
  28. 53 52
      app/src/main/res/layout/fragment_send.xml
  29. 42 41
      app/src/main/res/layout/fragment_send_info_confirm.xml
  30. 1 0
      app/src/main/res/layout/fragment_send_main.xml
  31. 13 10
      app/src/main/res/layout/fragment_send_success.xml
  32. 26 23
      app/src/main/res/layout/fragment_take.xml
  33. 27 25
      app/src/main/res/layout/fragment_take_code.xml
  34. 22 21
      app/src/main/res/layout/fragment_take_success.xml
  35. 8 4
      app/src/main/res/values/colors.xml
  36. 7 7
      app/src/main/res/values/strings.xml
  37. 14 1
      app/src/main/res/values/themes.xml

+ 1 - 2
app/src/main/java/com/emato/ich/MainActivity.java

@@ -5,9 +5,8 @@ import android.os.Bundle;
 import com.cherry.sdk.controller.utils.ScanGunKeyEventHelper;
 import com.emato.ich.api.ICSPApi;
 import com.emato.ich.api.ICSPClient;
-import com.emato.ich.api.ICSPConstant;
 import com.emato.ich.api.ICSPResponseCodeEnum;
-import com.emato.ich.api.SystemConfigConstant;
+import com.emato.ich.contant.SystemConfigConstant;
 import com.emato.ich.crash.CrashApplication;
 import com.emato.ich.device.DeviceControl;
 import com.emato.ich.entity.Cabinet;

+ 2 - 0
app/src/main/java/com/emato/ich/api/ICSPApi.java

@@ -1,5 +1,7 @@
 package com.emato.ich.api;
 
+import com.emato.ich.contant.ICSPConstant;
+
 public enum  ICSPApi {
 
     /**

+ 4 - 2
app/src/main/java/com/emato/ich/api/ICSPResponseCodeEnum.java

@@ -1,8 +1,10 @@
 package com.emato.ich.api;
 
+import android.content.Context;
 import android.view.View;
 
 import com.emato.ich.entity.vo.ResponseData;
+import com.emato.ich.utils.ToastUtils;
 import com.google.android.material.snackbar.Snackbar;
 
 import java.util.Arrays;
@@ -23,10 +25,10 @@ public enum ICSPResponseCodeEnum {
     ORDER_CONFIRM_FAIL("50012", "已取消或关闭的订单无法确认完成")
     ;
 
-    public static void responseHint(View view, ResponseData responseData){
+    public static void responseHint(Context context, ResponseData responseData){
         Arrays.stream(ICSPResponseCodeEnum.values()).forEach(icspResponseCodeEnum -> {
             if (responseData != null && !responseData.getCode().equals(ICSPResponseCodeEnum.OK.getCode()) && responseData.getCode().equals(icspResponseCodeEnum.getCode())) {
-                Snackbar.make(view, icspResponseCodeEnum.getMsg(), Snackbar.LENGTH_LONG).show();
+                ToastUtils.make(context, responseData.getMsg());
             }
         });
     }

+ 2 - 2
app/src/main/java/com/emato/ich/api/ICSPConstant.java → app/src/main/java/com/emato/ich/contant/ICSPConstant.java

@@ -1,10 +1,10 @@
-package com.emato.ich.api;
+package com.emato.ich.contant;
 
 public class ICSPConstant {
 
     public static final String ICSP_SERVICE = "http://icsp-api.ds-bay.com";
 //    public static final String ICSP_SERVICE = "http://68rfyvi.nat.ipyingshe.com";
-//    public static final String ICSP_SERVICE = "http://icsp-testend.ds-bay.com";
+//    public static final String ICSP_SERVICE = "http://icsp-testend.ds-bay.com";         // 测试+开发
 
     public static final String MQTT_SERVER_ADDRESS = "tcp://8.135.102.238:1883";
 //    public static final String MQTT_SERVER_ADDRESS = "tcp://183.3.221.143:1883";

+ 1 - 1
app/src/main/java/com/emato/ich/api/SystemConfigConstant.java → app/src/main/java/com/emato/ich/contant/SystemConfigConstant.java

@@ -1,4 +1,4 @@
-package com.emato.ich.api;
+package com.emato.ich.contant;
 
 /**
  * ICSP系统配置项

+ 37 - 12
app/src/main/java/com/emato/ich/fragment/ChooseCabinetFragment.java

@@ -1,7 +1,6 @@
 package com.emato.ich.fragment;
 
 import android.annotation.SuppressLint;
-import android.graphics.drawable.ColorDrawable;
 import android.os.Bundle;
 import android.os.CountDownTimer;
 import android.util.Log;
@@ -30,13 +29,14 @@ import com.emato.ich.entity.vo.ResponseData;
 import com.emato.ich.entity.vo.CabinetInfoVo;
 import com.emato.ich.local.LocalStorage;
 import com.emato.ich.utils.BaseUtils;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.JacksonUtils;
 import com.emato.ich.utils.StringUtils;
 import com.emato.ich.utils.TimeOutUtils;
+import com.emato.ich.utils.ToastUtils;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.android.material.snackbar.Snackbar;
 
 import org.jetbrains.annotations.NotNull;
 
@@ -58,6 +58,7 @@ public class ChooseCabinetFragment extends Fragment {
         if (available <= 0) {
             button.setEnabled(false);
         } else {
+            button.setEnabled(true);
             textView.setBackgroundColor(android.graphics.Color.parseColor("#44CE3B"));
         }
     }
@@ -75,6 +76,7 @@ public class ChooseCabinetFragment extends Fragment {
 
     public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
 
+//        ColorConstant.setButtonColor(binding.returnBtn, ColorConstant.RETURN_BUTTON_BG_COLOR);
         try {
             MainActivity activity = (MainActivity) getActivity();
             timer = TimeOutUtils.timeout(activity, ChooseCabinetFragment.this, binding.timeout, 60);
@@ -88,7 +90,7 @@ public class ChooseCabinetFragment extends Fragment {
             @Override
             public void onFailure(@NotNull Call call, @NotNull IOException e) {
                 // TODO 获取柜子信息失败处理
-                Snackbar.make(view, "获取柜子信息失败!网络异常!", Snackbar.LENGTH_LONG).show();
+                ToastUtils.make(getContext(), "获取柜子信息失败!网络异常!");
                 Log.e(TAG, "onFailure: 获取柜子信息调用失败! call: " + call.timeout().toString(), e);
             }
 
@@ -132,7 +134,7 @@ public class ChooseCabinetFragment extends Fragment {
                                         }
                                     });
                                 } else {
-                                    ICSPResponseCodeEnum.responseHint(view, responseData);
+                                    ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                                     Log.w(TAG, "onResponse: " + responseData.getMsg());
                                 }
 
@@ -142,7 +144,7 @@ public class ChooseCabinetFragment extends Fragment {
                                 Log.e(TAG, "onResponse: ", e);
                             }
                         } else {
-                            Snackbar.make(view, "获取柜子剩余信息出错!请重新进入此页面!", Snackbar.LENGTH_LONG).show();
+                            ToastUtils.make(getContext(), "获取柜子剩余信息出错!请重新进入此页面!");
                         }
                     });
                 }
@@ -151,15 +153,38 @@ public class ChooseCabinetFragment extends Fragment {
 
         Bundle bundle = new Bundle();
         // 大柜子
-        binding.bigCabinetBtn.setOnClickListener(v -> preparedOrder(CabinetTypeEnum.LARGE.getType(), bundle, v));
+        binding.bigCabinetBtn.setOnClickListener(v -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            preparedOrder(CabinetTypeEnum.LARGE.getType(), bundle, v);
+        });
         // 中柜子
-        binding.mediumCabinetBtn.setOnClickListener(v -> preparedOrder(CabinetTypeEnum.MEDIUM.getType(), bundle, v));
+        binding.mediumCabinetBtn.setOnClickListener(v -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            preparedOrder(CabinetTypeEnum.MEDIUM.getType(), bundle, v);
+        });
         // 小柜子
-        binding.smallCabinetBtn.setOnClickListener(v -> preparedOrder(CabinetTypeEnum.SMALL.getType(), bundle, v));
+        binding.smallCabinetBtn.setOnClickListener(v -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            preparedOrder(CabinetTypeEnum.SMALL.getType(), bundle, v);
+        });
         // 微小柜子
-        binding.tinyCabinetBtn.setOnClickListener(v -> preparedOrder(CabinetTypeEnum.MINI.getType(), bundle, v));
+        binding.tinyCabinetBtn.setOnClickListener(v -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            preparedOrder(CabinetTypeEnum.MINI.getType(), bundle, v);
+        });
 
         binding.returnBtn.setOnClickListener(v -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             MainActivity activity = (MainActivity) getActivity();
             activity.getBundleMap().put(ChooseCabinetFragment.class.getName(), bundle);
             Bundle exceptionBundle = activity.getBundleMap().get(ExceptionFragment.class.getName());
@@ -186,7 +211,7 @@ public class ChooseCabinetFragment extends Fragment {
                 Bundle inputInfoBundle = activity.getBundleMap().get(InputInfoFragment.class.getName());
                 ObjectMapper objectMapper = JacksonUtils.objectmapper;
                 if (inputInfoBundle == null) {
-                    Snackbar.make(view, "您还没有投递! ", Snackbar.LENGTH_SHORT).show();
+                    ToastUtils.make(getContext(), "您还没有投递!");
                 } else {
                     String orderResponse = inputInfoBundle.getString("preparedOrderResponse");
                     if (null != orderResponse && orderResponse.trim().length() > 0) {
@@ -202,7 +227,7 @@ public class ChooseCabinetFragment extends Fragment {
                             @Override
                             public void onFailure(@NotNull Call call, @NotNull IOException e) {
                                 //
-                                Snackbar.make(view, "换柜子失败!网络异常!", Snackbar.LENGTH_LONG).show();
+                                ToastUtils.make(getContext(), "换柜子失败!网络异常!");
                                 Log.e(TAG, "onFailure: 大小不合适, 换柜子更新预下单失败! ", e);
                             }
 
@@ -238,7 +263,7 @@ public class ChooseCabinetFragment extends Fragment {
                                                 }
                                             }
                                         } else {
-                                            ICSPResponseCodeEnum.responseHint(view, responseData);
+                                            ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                                             Log.e(TAG, "onResponse: ICSP返回码: " + responseData.getCode() + ", 返回信息: " + responseData.getMsg(), new RuntimeException("系统异常"));
                                         }
                                     } catch (JsonProcessingException e) {

+ 45 - 15
app/src/main/java/com/emato/ich/fragment/ExceptionFragment.java

@@ -23,11 +23,12 @@ import com.emato.ich.entity.vo.PreparedOrderResponseVo;
 import com.emato.ich.entity.vo.ResponseData;
 import com.emato.ich.local.LocalStorage;
 import com.emato.ich.utils.BaseUtils;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.JacksonUtils;
 import com.emato.ich.utils.TimeOutUtils;
+import com.emato.ich.utils.ToastUtils;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.android.material.snackbar.Snackbar;
 
 import org.jetbrains.annotations.NotNull;
 
@@ -54,7 +55,7 @@ public class ExceptionFragment extends Fragment {
 
 
     public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
-
+//        ColorConstant.setButtonColor(binding.returnBtn, ColorConstant.RETURN_BUTTON_BG_COLOR);
         try {
             MainActivity activity = (MainActivity) getActivity();
             timer = TimeOutUtils.timeout(activity, ExceptionFragment.this, binding.timeout, 60);
@@ -84,6 +85,9 @@ public class ExceptionFragment extends Fragment {
         // 大小不合适
         Bundle finalArguments = arguments;
         binding.issueSize.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             MainActivity activity1 = (MainActivity) getActivity();
             Bundle bundle = new Bundle();
             bundle.putString("exception", "change_cabinet");
@@ -92,20 +96,46 @@ public class ExceptionFragment extends Fragment {
             NavHostFragment.findNavController(ExceptionFragment.this).navigate(R.id.action_exceptionFragment_to_ChooseCabinetFragment);
         });
         // 门没开换柜门
-        binding.issueDoorNotOpen.setOnClickListener(view1 -> handleExceptionScene(finalArguments, DecisionEnum.REOPEN_02, view1));
+        binding.issueDoorNotOpen.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            handleExceptionScene(finalArguments, DecisionEnum.REOPEN_02, view1);
+        });
         // 门没开再开一次
-        binding.issueOpenAgain.setOnClickListener(view1 -> handleExceptionScene(finalArguments, DecisionEnum.REOPEN_03, view1));
+        binding.issueOpenAgain.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            handleExceptionScene(finalArguments, DecisionEnum.REOPEN_03, view1);
+        });
         // 未投递 取消
-        binding.issueCancel.setOnClickListener(view1 -> handleExceptionScene(finalArguments, DecisionEnum.CANCEL_11, view1));
+        binding.issueCancel.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            handleExceptionScene(finalArguments, DecisionEnum.CANCEL_11, view1);
+        });
         // 拿出快递 取消
-        binding.issueTakeCancel.setOnClickListener(view1 -> handleExceptionScene(finalArguments, DecisionEnum.CANCEL_12, view1));
+        binding.issueTakeCancel.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            handleExceptionScene(finalArguments, DecisionEnum.CANCEL_12, view1);
+        });
 
         // 联系我们
         binding.issueOther.setOnClickListener(view1 -> {
-            Snackbar.make(view1, "电话: 16274237018! 请说明原由! ", Snackbar.LENGTH_LONG).show();
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            ToastUtils.make(getContext(), "电话: 16274237018! 请说明原由! ");
         });
         MainActivity finalActivity = activity;
         binding.returnBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             Bundle bundle = finalActivity.getBundleMap().get(SendInfoConfirmFragment.class.getName());
             timer.cancel();
             if (null != bundle) {
@@ -123,7 +153,7 @@ public class ExceptionFragment extends Fragment {
     private void handleExceptionScene(Bundle bundle, DecisionEnum decisionEnum, View view){
         LocalStorage.Session session = LocalStorage.getInstance().getSession();
         if (LocalStorage.getInstance().isExpired(session)) {
-            Snackbar.make(ExceptionFragment.this.requireView(), "会话已过期! 请重新登录! ", Snackbar.LENGTH_LONG).show();
+            ToastUtils.make(getContext(), "会话已过期! 请重新登录! ");
             return;
         }
         if (null == bundle) {
@@ -142,28 +172,28 @@ public class ExceptionFragment extends Fragment {
                 case CANCEL_11:
                     // 未投递 取消
                     confirmOrderVo.setDecision(DecisionEnum.CANCEL_11.getDecision());
-                    Snackbar.make(view, "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ", Snackbar.LENGTH_LONG).show();
+                    ToastUtils.make(getContext(), "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ");
                     break;
                 case CANCEL_12:
                     // 拿出快递 取消
                     confirmOrderVo.setDecision(DecisionEnum.CANCEL_12.getDecision());
-                    Snackbar.make(view, "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ", Snackbar.LENGTH_LONG).show();
+                    ToastUtils.make(getContext(), "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ");
                     NavHostFragment.findNavController(ExceptionFragment.this).navigate(R.id.action_exceptionFragment_to_sendSuccessFragment);
                     break;
                 case REOPEN_01:
                     // 大小不合适
                     confirmOrderVo.setDecision(DecisionEnum.REOPEN_01.getDecision());
-                    Snackbar.make(view, "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ", Snackbar.LENGTH_LONG).show();
+                    ToastUtils.make(getContext(), "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ");
                     break;
                 case REOPEN_02:
                     // 门没开换柜门
                     confirmOrderVo.setDecision(DecisionEnum.REOPEN_02.getDecision());
-                    Snackbar.make(view, "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ", Snackbar.LENGTH_LONG).show();
+                    ToastUtils.make(getContext(), "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ");
                     break;
                 case REOPEN_03:
                     // 门没开再开一次
                     confirmOrderVo.setDecision(DecisionEnum.REOPEN_03.getDecision());
-                    Snackbar.make(view, "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ", Snackbar.LENGTH_LONG).show();
+                    ToastUtils.make(getContext(), "异常处理只能处理一次! 如未处理您的问题! 请联系我们处理! ");
                     break;
                 default:
                     break;
@@ -179,7 +209,7 @@ public class ExceptionFragment extends Fragment {
             ICSPClient.confirmOrder(LocalStorage.getInstance().getSession().getToken(), confirmOrderVo, new Callback() {
                 @Override
                 public void onFailure(@NotNull Call call, @NotNull IOException e) {
-                    Snackbar.make(view, "发送异常处理请求失败!网络异常!", Snackbar.LENGTH_LONG).show();
+                    ToastUtils.make(getContext(), "发送异常处理请求失败!网络异常!");
                     Log.e(TAG, "onFailure: 发送异常处理请求失败! ", e);
                 }
 
@@ -225,7 +255,7 @@ public class ExceptionFragment extends Fragment {
                                             break;
                                     }
                                 } else {
-                                    ICSPResponseCodeEnum.responseHint(view, responseData);
+                                    ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                                     Log.w(TAG, "onResponse: " + responseData.getMsg());
                                 }
                             } catch (JsonProcessingException e) {

+ 2 - 2
app/src/main/java/com/emato/ich/fragment/InputInfoFragment.java

@@ -120,7 +120,7 @@ public class InputInfoFragment extends Fragment {
                                         binding.delivererPhoneConfirm.setText(collectorPhone);
                                     }
 
-                                    ICSPResponseCodeEnum.responseHint(view, responseData);
+                                    ICSPResponseCodeEnum.responseHint(getContext(), responseData);
 
                                 } catch (JsonProcessingException e) {
                                     Log.e(TAG, "onResponse: 服务器响应错误! 自动获取用户手机号失败! ", e);
@@ -198,7 +198,7 @@ public class InputInfoFragment extends Fragment {
                                         timer.cancel();
                                         NavHostFragment.findNavController(InputInfoFragment.this).navigate(R.id.action_inputInfoFragment_to_sendInfoConfirmFragment);
                                     } else {
-                                        ICSPResponseCodeEnum.responseHint(view, responseData);
+                                        ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                                         Log.e(TAG, "onResponse: ICSP返回码: " + responseData.getCode() + ", 返回信息: " + responseData.getMsg(), new RuntimeException("系统异常"));
                                     }
                                 } catch (JsonProcessingException e) {

+ 16 - 9
app/src/main/java/com/emato/ich/fragment/MainFragment.java

@@ -14,18 +14,15 @@ import androidx.navigation.fragment.NavHostFragment;
 import com.emato.ich.MainActivity;
 import com.emato.ich.R;
 import com.emato.ich.api.ICSPClient;
-import com.emato.ich.api.SystemConfigConstant;
+import com.emato.ich.contant.SystemConfigConstant;
 import com.emato.ich.databinding.FragmentMainBinding;
-import com.emato.ich.entity.vo.ShellVo;
-import com.emato.ich.utils.BaseUtils;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.StringUtils;
-import com.xuexiang.xupdate.XUpdate;
 
 import org.jetbrains.annotations.NotNull;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.URL;
 
 import okhttp3.Call;
 import okhttp3.Callback;
@@ -76,11 +73,21 @@ public class MainFragment extends Fragment {
         }
 
         // 投递页面跳转
-        binding.sendBtn.setOnClickListener(view12 -> NavHostFragment.findNavController(MainFragment.this)
-                .navigate(R.id.action_mainFragment_to_sendFragment));
+        binding.sendBtn.setOnClickListener(view12 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            NavHostFragment.findNavController(MainFragment.this)
+                    .navigate(R.id.action_mainFragment_to_sendFragment);
+        });
         // 取件页面跳转
-        binding.takeBtn.setOnClickListener(view1 -> NavHostFragment.findNavController(MainFragment.this)
-                .navigate(R.id.action_mainFragment_to_takeFragment));
+        binding.takeBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
+            NavHostFragment.findNavController(MainFragment.this)
+                    .navigate(R.id.action_mainFragment_to_takeFragment);
+        });
     }
 
     @Override

+ 32 - 11
app/src/main/java/com/emato/ich/fragment/SendFragment.java

@@ -18,18 +18,19 @@ import com.emato.ich.MainActivity;
 import com.emato.ich.R;
 import com.emato.ich.api.ICSPClient;
 import com.emato.ich.api.ICSPResponseCodeEnum;
-import com.emato.ich.api.SystemConfigConstant;
+import com.emato.ich.contant.SystemConfigConstant;
 import com.emato.ich.databinding.FragmentSendBinding;
 import com.emato.ich.entity.vo.ResponseData;
 import com.emato.ich.entity.vo.ResponseTokenVo;
 import com.emato.ich.local.LocalStorage;
 import com.emato.ich.utils.BaseUtils;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.JacksonUtils;
 import com.emato.ich.utils.StringUtils;
 import com.emato.ich.utils.TimeOutUtils;
+import com.emato.ich.utils.ToastUtils;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
-import com.google.android.material.snackbar.Snackbar;
 
 import org.jetbrains.annotations.NotNull;
 
@@ -70,6 +71,9 @@ public class SendFragment extends Fragment {
         }
 
         binding.inputButtonConfirm.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             // 登录逻辑  editTextTextPersonName4 手机 editTextTextPersonName5 密码
             String sendPhone = binding.editTextTextPersonName4.getText().toString();
             String password = binding.editTextTextPersonName5.getText().toString();
@@ -83,7 +87,7 @@ public class SendFragment extends Fragment {
                     @Override
                     public void onFailure(@NotNull Call call, @NotNull IOException e) {
                         // TODO 登录失败处理
-                        Snackbar.make(view1, "登录失败!网络异常!", Snackbar.LENGTH_LONG).show();
+                        ToastUtils.make(getContext(), "登录失败!网络异常!");
                         Log.e(TAG, "onFailure: 登录失败! call: " + call.timeout().toString(), e);
                     }
 
@@ -103,35 +107,35 @@ public class SendFragment extends Fragment {
                                         session.setToken(data.getToken());
                                         LocalStorage.getInstance().setSession(session);
                                         // 登录成功
-                                        Snackbar.make(view1, "登录成功!", Snackbar.LENGTH_LONG).show();
+                                        ToastUtils.make(getContext(), "登录成功!");
                                         timer.cancel();
                                         NavHostFragment.findNavController(SendFragment.this).navigate(R.id.action_sendFragment_to_sendMainFragment);
                                     } else {
-                                        ICSPResponseCodeEnum.responseHint(view, responseData);
+                                        ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                                         Log.w(TAG, "onResponse: " + responseData.getMsg());
                                     }
 
                                 } catch (JsonProcessingException e) {
                                     Log.e(TAG, "onViewCreated: 解析登录响应信息错误! response body: " + responseStr, e);
-                                    Snackbar.make(view1, "登录失败!", Snackbar.LENGTH_LONG).show();
+                                    ToastUtils.make(getContext(), "登录失败!");
                                 } catch (ClassCastException e) {
                                     Log.e(TAG, "onResponse: 解析登录响应信息类型转换错误! response body: " + responseStr, e);
-                                    Snackbar.make(view1, "登录失败!", Snackbar.LENGTH_LONG).show();
+                                    ToastUtils.make(getContext(), "登录失败!");
                                 } catch (RuntimeException e) {
                                     Log.e(TAG, "onResponse: 登录失败! ", e);
-                                    Snackbar.make(view1, "登录失败!", Snackbar.LENGTH_LONG).show();
+                                    ToastUtils.make(getContext(), "登录失败!");
                                 }
                             } else {
                                 // 登录失败
-                                Snackbar.make(view1, "登录失败!手机号或密码错误!", Snackbar.LENGTH_LONG).show();
+                                ToastUtils.make(getContext(), "登录失败!手机号或密码错误!");
                             }
                         });
                     }
                 });
             } else if (!phonePattern.matcher(sendPhone).matches()){
-                Snackbar.make(view1, "请输入正确的手机号!", Snackbar.LENGTH_LONG).show();
+                ToastUtils.make(getContext(), "输入正确的手机号!");
             } else if (!pwdPattern.matcher(password).matches()) {
-                Snackbar.make(view1, "密码格式错误!请输入8-16位的数字!", Snackbar.LENGTH_LONG).show();
+                ToastUtils.make(getContext(), "密码格式错误!请输入8-16位的数字!");
             }
         });
 
@@ -199,6 +203,11 @@ public class SendFragment extends Fragment {
                             binding.editTextTextPersonName4.setSelection(binding.editTextTextPersonName4.getText().length());
                         }
                     });
+                    // 长按删除
+                    binding.inputButtonCancel.setOnLongClickListener(v -> {
+                        binding.editTextTextPersonName5.getText().clear();
+                        return false;
+                    });
                 }
             });
         }
@@ -254,14 +263,26 @@ public class SendFragment extends Fragment {
                         binding.editTextTextPersonName5.setSelection(binding.editTextTextPersonName5.getText().length());
                     }
                 });
+                // 长按删除
+                binding.inputButtonCancel.setOnLongClickListener(v -> {
+                    binding.editTextTextPersonName5.getText().clear();
+                    return false;
+                });
             }
         });
 
         binding.returnBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             NavHostFragment.findNavController(SendFragment.this)
                     .navigate(R.id.action_sendFragment_to_mainFragment);
         });
+
+
+        // 默认选中密码输入
+        binding.editTextTextPersonName5.requestFocus();
     }
 
     @Override

+ 1 - 1
app/src/main/java/com/emato/ich/fragment/SendInfoConfirmFragment.java

@@ -130,7 +130,7 @@ public class SendInfoConfirmFragment extends Fragment {
                                         .navigate(R.id.action_sendInfoConfirmFragment_to_sendSuccessFragment);
                             } else {
                                 // TODO 确认投递失败逻辑处理
-                                ICSPResponseCodeEnum.responseHint(view, responseData);
+                                ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                                 Log.w(TAG, "onResponse: " + responseData.getMsg());
                             }
                         } catch (JsonProcessingException e) {

+ 11 - 0
app/src/main/java/com/emato/ich/fragment/SendMainFragment.java

@@ -15,6 +15,7 @@ import androidx.navigation.fragment.NavHostFragment;
 import com.emato.ich.MainActivity;
 import com.emato.ich.R;
 import com.emato.ich.databinding.FragmentSendMainBinding;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.TimeOutUtils;
 
 import org.jetbrains.annotations.NotNull;
@@ -37,6 +38,7 @@ public class SendMainFragment extends Fragment {
 
 
     public  void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
+//        ColorConstant.setButtonColor(binding.returnBtn, ColorConstant.RETURN_BUTTON_BG_COLOR);
         // 去除异常页数据
         try {
             MainActivity activity = ((MainActivity) getActivity());
@@ -53,17 +55,26 @@ public class SendMainFragment extends Fragment {
         }
         // 输入快件信息
         binding.sendConfirmBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             NavHostFragment.findNavController(SendMainFragment.this)
                     .navigate(R.id.action_sendMainFragment_to_chooseCabinetFragment);
         });
         // 异常处理
         binding.exceptionHandleBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             NavHostFragment.findNavController(SendMainFragment.this)
                     .navigate(R.id.action_sendMainFragment_to_exceptionFragment);
         });
         binding.returnBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             NavHostFragment.findNavController(SendMainFragment.this)
                     .navigate(R.id.action_sendMainFragment_to_sendFragment);

+ 11 - 3
app/src/main/java/com/emato/ich/fragment/SendSuccessFragment.java

@@ -16,12 +16,11 @@ import com.emato.ich.MainActivity;
 import com.emato.ich.R;
 import com.emato.ich.databinding.FragmentSendSuccessBinding;
 import com.emato.ich.local.LocalStorage;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.TimeOutUtils;
 
 import org.jetbrains.annotations.NotNull;
 
-import java.util.Map;
-
 public class SendSuccessFragment extends Fragment {
 
     private static final String TAG = SendSuccessFragment.class.getName();
@@ -40,7 +39,7 @@ public class SendSuccessFragment extends Fragment {
 
 
     public void onViewCreated(@NonNull @NotNull View view, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
-
+//        ColorConstant.setButtonColor(binding.returnMainBtn, ColorConstant.RETURN_BUTTON_BG_COLOR);
         try {
             MainActivity activity = ((MainActivity) getActivity());
             timer = TimeOutUtils.timeout(activity, SendSuccessFragment.this, binding.timeout, 60);
@@ -51,6 +50,9 @@ public class SendSuccessFragment extends Fragment {
 
         // 继续投递
         binding.continueSendBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             NavHostFragment.findNavController(SendSuccessFragment.this)
                     .navigate(R.id.action_sendSuccessFragment_to_chooseCabinetFragment);
@@ -58,6 +60,9 @@ public class SendSuccessFragment extends Fragment {
 
         // 退出账号
         binding.exitAccountBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             // 清空Session
             MainActivity activity = (MainActivity) getActivity();
             LocalStorage.getInstance().cleanSession(activity);
@@ -67,6 +72,9 @@ public class SendSuccessFragment extends Fragment {
         });
 
         binding.returnMainBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             MainActivity activity = (MainActivity) getActivity();
             LocalStorage.getInstance().cleanSession(activity);

+ 72 - 9
app/src/main/java/com/emato/ich/fragment/TakeCodeFragment.java

@@ -5,10 +5,12 @@ import android.os.Bundle;
 import android.os.CountDownTimer;
 import android.text.Editable;
 import android.util.Log;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
@@ -19,25 +21,25 @@ import com.emato.ich.MainActivity;
 import com.emato.ich.R;
 import com.emato.ich.api.ICSPClient;
 import com.emato.ich.api.ICSPResponseCodeEnum;
-import com.emato.ich.api.SystemConfigConstant;
+import com.emato.ich.contant.SystemConfigConstant;
 import com.emato.ich.databinding.FragmentTakeCodeBinding;
 import com.emato.ich.entity.vo.PreparedOrderResponseVo;
 import com.emato.ich.entity.vo.ResponseData;
 import com.emato.ich.entity.vo.TakeParcelVo;
 import com.emato.ich.utils.BaseUtils;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.StringUtils;
 import com.emato.ich.utils.JacksonUtils;
 import com.emato.ich.utils.TimeOutUtils;
+import com.emato.ich.utils.ToastUtils;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.android.material.snackbar.Snackbar;
 
 import org.jetbrains.annotations.NotNull;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.URL;
 
 import okhttp3.Call;
 import okhttp3.Callback;
@@ -109,42 +111,92 @@ public class TakeCodeFragment extends Fragment {
         binding.editTextTextPersonName6.setOnFocusChangeListener((view1, hasFocus) -> {
             if (hasFocus) {
                 binding.takeInputButton0.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"0");
                 });
                 binding.takeInputButton1.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"1");
                 });
                 binding.takeInputButton2.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"2");
                 });
                 binding.takeInputButton3.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"3");
                 });
                 binding.takeInputButton4.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"4");
                 });
                 binding.takeInputButton5.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"5");
                 });
                 binding.takeInputButton6.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"6");
                 });
                 binding.takeInputButton7.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"7");
                 });
                 binding.takeInputButton8.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"8");
                 });
                 binding.takeInputButton9.setOnClickListener(v -> {
+                    int length = binding.editTextTextPersonName6.getText().length();
+                    if (length >= 8) {
+                        ToastUtils.make(getContext(), "取件码不能超过8位");
+                        return;
+                    }
                     int start = binding.editTextTextPersonName6.getSelectionStart();
                     binding.editTextTextPersonName6.getText().insert(start,"9");
                 });
@@ -156,10 +208,18 @@ public class TakeCodeFragment extends Fragment {
                        binding.editTextTextPersonName6.setSelection(binding.editTextTextPersonName6.getText().length());
                    }
                 });
+                // 长按删除
+                binding.takeInputButtonCancel.setOnLongClickListener(v -> {
+                    binding.editTextTextPersonName6.getText().clear();
+                    return false;
+                });
             }
         });
 
         binding.takeInputButtonConfirm.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             // TODO 取件逻辑
             String takeParcelCode = binding.editTextTextPersonName6.getText().toString();
             if (null != takeParcelCode && !"".equals(takeParcelCode.trim()) && takeParcelCode.length() > 0) {
@@ -171,7 +231,7 @@ public class TakeCodeFragment extends Fragment {
                     @Override
                     public void onFailure(@NotNull Call call, @NotNull IOException e) {
                         // TODO 取件接口请求失败逻辑处理
-                        Snackbar.make(view, "取件失败!网络异常!", Snackbar.LENGTH_LONG).show();
+                        ToastUtils.make(getContext(), "取件失败!网络异常!");
                         Log.e(TAG, "onFailure: 取件请求失败!", e);
                     }
 
@@ -186,17 +246,17 @@ public class TakeCodeFragment extends Fragment {
                                 try {
                                     responseData = objectMapper.readValue(parseResponse, new TypeReference<ResponseData<PreparedOrderResponseVo>>() {
                                     });
-                                    ICSPResponseCodeEnum.responseHint(view1, responseData);
+                                    ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                                 } catch (JsonProcessingException e) {
                                     Log.e(TAG, "onResponse: 解析取件开门响应信息失败! ", e);
                                 } catch (RuntimeException e) {
                                     Log.e(TAG, "onResponse: 未知错误! ", e);
-                                    Snackbar.make(view1, "未知错误!", Snackbar.LENGTH_LONG).show();
+                                    ToastUtils.make(getContext(), "未知错误!");
                                 }
                                 if (null != responseData && responseData.getCode().equals(ICSPResponseCodeEnum.OK.getCode())) {
                                     // 开门
                                     Log.i(TAG, "onResponse: 取件成功! ");
-                                    Snackbar.make(view1, "取件成功!", Snackbar.LENGTH_LONG).show();
+                                    ToastUtils.make(getContext(), "取件成功!");
                                     Bundle bundle = new Bundle();
                                     bundle.putString("takeParcelCode", takeParcelCode);
                                     bundle.putString("takeCabinetNo", responseData.getData().getLockerName());
@@ -206,17 +266,20 @@ public class TakeCodeFragment extends Fragment {
                                 }
                             } catch (RuntimeException e) {
                                 Log.e(TAG, "onResponse: 取件失败! ", e);
-                                Snackbar.make(view1, "取件失败!", Snackbar.LENGTH_LONG).show();
+                                ToastUtils.make(getContext(), "取件失败!");
                             }
                         });
                     }
                 });
             } else {
-                Snackbar.make(view, "取件失败!取件码不能为空!", Snackbar.LENGTH_LONG).show();
+                ToastUtils.make(getContext(), "取件失败!取件码不能为空!");
             }
 
         });
         binding.returnBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             NavHostFragment.findNavController(TakeCodeFragment.this)
                     .navigate(R.id.action_takeCodeFragment_to_takeFragment);

+ 9 - 2
app/src/main/java/com/emato/ich/fragment/TakeFragment.java

@@ -16,8 +16,9 @@ import androidx.navigation.fragment.NavHostFragment;
 import com.emato.ich.MainActivity;
 import com.emato.ich.R;
 import com.emato.ich.api.ICSPClient;
-import com.emato.ich.api.SystemConfigConstant;
+import com.emato.ich.contant.SystemConfigConstant;
 import com.emato.ich.databinding.FragmentTakeBinding;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.StringUtils;
 import com.emato.ich.utils.TimeOutUtils;
 
@@ -25,7 +26,6 @@ import org.jetbrains.annotations.NotNull;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.URL;
 
 import okhttp3.Call;
 import okhttp3.Callback;
@@ -52,6 +52,7 @@ public class TakeFragment extends Fragment {
     public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
 
+//        ColorConstant.setButtonColor(binding.returnBtn, ColorConstant.RETURN_BUTTON_BG_COLOR);
         try {
             MainActivity activity = ((MainActivity) getActivity());
             timer = TimeOutUtils.timeout(activity, TakeFragment.this, binding.timeout, 60);
@@ -90,11 +91,17 @@ public class TakeFragment extends Fragment {
 
         // 跳转输入取件码
         binding.toInputTakeCodeBtn.setOnClickListener( view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             NavHostFragment.findNavController(TakeFragment.this)
                     .navigate(R.id.action_takeFragment_to_takeCodeFragment);
         });
         binding.returnBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             NavHostFragment.findNavController(TakeFragment.this)
                     .navigate(R.id.action_takeFragment_to_mainFragment);

+ 19 - 9
app/src/main/java/com/emato/ich/fragment/TakeSuccessFragment.java

@@ -16,24 +16,24 @@ import com.emato.ich.MainActivity;
 import com.emato.ich.R;
 import com.emato.ich.api.ICSPClient;
 import com.emato.ich.api.ICSPResponseCodeEnum;
-import com.emato.ich.api.SystemConfigConstant;
+import com.emato.ich.contant.SystemConfigConstant;
 import com.emato.ich.databinding.FragmentTakeSuccessBinding;
 import com.emato.ich.entity.vo.PreparedOrderResponseVo;
 import com.emato.ich.entity.vo.ResponseData;
 import com.emato.ich.entity.vo.TakeParcelVo;
 import com.emato.ich.local.LocalStorage;
 import com.emato.ich.utils.BaseUtils;
+import com.emato.ich.utils.ButtonUtils;
 import com.emato.ich.utils.JacksonUtils;
 import com.emato.ich.utils.TimeOutUtils;
+import com.emato.ich.utils.ToastUtils;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.android.material.snackbar.Snackbar;
 
 import org.jetbrains.annotations.NotNull;
 
 import java.io.IOException;
-import java.util.Map;
 
 import okhttp3.Call;
 import okhttp3.Callback;
@@ -59,6 +59,7 @@ public class TakeSuccessFragment extends Fragment {
 
     public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
 
+//        ColorConstant.setButtonColor(binding.returnMainBtn, ColorConstant.RETURN_BUTTON_BG_COLOR);
         try {
             MainActivity activity = ((MainActivity) getActivity());
             timer = TimeOutUtils.timeout(activity, TakeSuccessFragment.this, binding.timeout, 60);
@@ -68,6 +69,9 @@ public class TakeSuccessFragment extends Fragment {
         }
 
         binding.continueTakeBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             timer2.cancel();
             NavHostFragment.findNavController(TakeSuccessFragment.this)
@@ -75,6 +79,9 @@ public class TakeSuccessFragment extends Fragment {
         });
 
         binding.returnMainBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
             timer.cancel();
             timer2.cancel();
             MainActivity activity = (MainActivity) getActivity();
@@ -108,6 +115,9 @@ public class TakeSuccessFragment extends Fragment {
         }
 
         binding.reOpenCabinetBtn.setOnClickListener(view1 -> {
+            if (ButtonUtils.isFastClick()) {
+                return;
+            }
 
             binding.reOpenCabinetBtn.setEnabled(false);
 
@@ -130,7 +140,7 @@ public class TakeSuccessFragment extends Fragment {
                 @Override
                 public void onFailure(@NotNull Call call, @NotNull IOException e) {
                     // TODO 取件接口请求失败逻辑处理
-                    Snackbar.make(view, "取件失败!网络异常!", Snackbar.LENGTH_LONG).show();
+                    ToastUtils.make(getContext(), "取件失败!网络异常!");
                     Log.e(TAG, "onFailure: 取件请求失败!", e);
                 }
 
@@ -145,26 +155,26 @@ public class TakeSuccessFragment extends Fragment {
                             try {
                                 responseData = objectMapper.readValue(parseResponse, new TypeReference<ResponseData<PreparedOrderResponseVo>>() {
                                 });
-                                ICSPResponseCodeEnum.responseHint(view1, responseData);
+                                ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                             } catch (JsonProcessingException e) {
                                 Log.e(TAG, "onResponse: 解析取件开门响应信息失败! ", e);
                             } catch (RuntimeException e) {
                                 Log.e(TAG, "onResponse: 未知错误! ", e);
-                                Snackbar.make(view1, "未知错误!", Snackbar.LENGTH_LONG).show();
+                                ToastUtils.make(getContext(), "未知错误!");
                             }
                             if (null != responseData && responseData.getCode().equals(ICSPResponseCodeEnum.OK.getCode())) {
                                 // 开门
                                 Log.i(TAG, "onResponse: 取件成功! ");
-                                Snackbar.make(view1, "取件成功!", Snackbar.LENGTH_LONG).show();
+                                ToastUtils.make(getContext(), "取件成功!");
                                 PreparedOrderResponseVo data = responseData.getData();
                                 binding.openCabinetHintNo.setText(data.getLockerName());
                                 finalActivity.getBundleMap().remove(TakeCodeFragment.class.getName());
                             } else {
-                                ICSPResponseCodeEnum.responseHint(view1, responseData);
+                                ICSPResponseCodeEnum.responseHint(getContext(), responseData);
                             }
                         } catch (RuntimeException e) {
                             Log.e(TAG, "onResponse: 取件失败! ", e);
-                            Snackbar.make(view1, "取件失败!", Snackbar.LENGTH_LONG).show();
+                            ToastUtils.make(getContext(), "取件失败!");
                         }
                     });
                 }

+ 1 - 4
app/src/main/java/com/emato/ich/message/ICHPublishClient.java

@@ -2,9 +2,8 @@ package com.emato.ich.message;
 
 import android.util.Log;
 
-import com.emato.ich.api.ICSPConstant;
+import com.emato.ich.contant.ICSPConstant;
 import com.emato.ich.utils.BaseUtils;
-import com.emato.ich.utils.Md5Utils;
 
 import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
 import org.eclipse.paho.client.mqttv3.IMqttMessageListener;
@@ -17,8 +16,6 @@ import org.eclipse.paho.client.mqttv3.MqttMessage;
 import org.eclipse.paho.client.mqttv3.MqttTopic;
 import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
 
-import java.util.Date;
-
 /**
  * 发布客户端
  */

+ 1 - 2
app/src/main/java/com/emato/ich/message/ICHSubscribeClient.java

@@ -2,9 +2,8 @@ package com.emato.ich.message;
 
 import android.util.Log;
 
-import com.emato.ich.api.ICSPConstant;
+import com.emato.ich.contant.ICSPConstant;
 import com.emato.ich.utils.BaseUtils;
-import com.emato.ich.utils.Md5Utils;
 
 import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
 import org.eclipse.paho.client.mqttv3.IMqttMessageListener;

+ 16 - 0
app/src/main/java/com/emato/ich/utils/ButtonUtils.java

@@ -0,0 +1,16 @@
+package com.emato.ich.utils;
+
+public class ButtonUtils {
+
+    private static long lastClickTime;
+
+    public synchronized static boolean isFastClick() {
+        long time = System.currentTimeMillis();
+        if (time - lastClickTime < 500) {
+            return true;
+        }
+        lastClickTime = time;
+        return false;
+    }
+
+}

+ 40 - 0
app/src/main/java/com/emato/ich/utils/ToastUtils.java

@@ -0,0 +1,40 @@
+package com.emato.ich.utils;
+
+import android.content.Context;
+import android.os.Handler;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.emato.ich.R;
+
+public class ToastUtils {
+
+    private static Toast mToast;
+    private static Handler mHandler = new Handler();
+    private static Runnable runnable = new Runnable() {
+        public void run() {
+            mToast.cancel();
+            //toast隐藏后,将其置为null
+            mToast=null;
+        }
+    };
+
+    public static void make(Context context, String msg) {
+        LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        //自定义布局
+        View view = inflater.inflate(R.layout.custom_toast, null);
+        TextView text = (TextView) view.findViewById(R.id.toast_message);
+        //显示的提示文字
+        text.setText(msg);
+        mHandler.removeCallbacks(runnable);
+        mToast = new Toast(context);
+        mToast.setDuration(Toast.LENGTH_SHORT);
+        mToast.setGravity(Gravity.CENTER, 0, -22);
+        mToast.setView(view);
+        mToast.show();
+    }
+
+}

+ 11 - 0
app/src/main/res/drawable/toast_bg.xml

@@ -0,0 +1,11 @@
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <!-- 填充的颜色 -->
+    <solid android:color="#000000" />
+    <!-- 弧形的半径 -->
+    <corners android:radius="20dp" />
+    <!-- 边框的颜色及粗细 -->
+<!--    <stroke android:color="#000"-->
+<!--        android:width="4dp"/>-->
+</shape>

+ 2 - 1
app/src/main/res/layout/activity_main.xml

@@ -6,7 +6,8 @@
     android:layout_height="match_parent"
     tools:context=".MainActivity"
     android:focusable="true"
-    android:focusableInTouchMode="true">
+    android:focusableInTouchMode="true"
+    android:splitMotionEvents="false">
 
 <!--    <com.google.android.material.appbar.AppBarLayout-->
 <!--        android:layout_width="match_parent"-->

+ 17 - 0
app/src/main/res/layout/custom_toast.xml

@@ -0,0 +1,17 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="35dp"
+    android:background="@drawable/toast_bg"
+    android:padding="10dp" >
+    <TextView
+        android:id="@+id/toast_message"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:maxLines="2"
+        android:textColor="#fff"
+        android:textSize="14sp"
+        android:paddingLeft="5dp"
+        android:paddingRight="5dp"
+        android:text=""/>
+</RelativeLayout>

+ 52 - 42
app/src/main/res/layout/fragment_choose_cabinet.xml

@@ -12,22 +12,25 @@
         android:layout_y="550dp"
         android:gravity="center"
         android:textSize="15dp" />
-    <Button
-        android:id="@+id/return_btn"
+
+    <TextView
+        android:id="@+id/tiny_cabinet_bg"
         android:layout_width="60dp"
-        android:layout_height="30dp"
-        android:layout_x="25dp"
-        android:layout_y="494dp"
-        android:background="@drawable/button_radius"
-        android:text="@string/return_btn"
-        android:textSize="8dp" />
+        android:layout_height="60dp"
+        android:layout_x="30dp"
+        android:layout_y="363dp"
+        android:background="@color/choose_cabinet_view"
+        android:gravity="center"
+        android:text="@string/tiny_cabinet"
+        android:textColor="@color/white"
+        android:textSize="10dp" />
 
     <TextView
         android:id="@+id/small_cabinet_bg"
         android:layout_width="65dp"
         android:layout_height="65dp"
-        android:layout_x="80dp"
-        android:layout_y="350dp"
+        android:layout_x="98dp"
+        android:layout_y="358dp"
         android:background="@color/choose_cabinet_view"
         android:gravity="center"
         android:text="@string/small_cabinet"
@@ -38,9 +41,11 @@
         android:id="@+id/small_cabinet_btn"
         android:layout_width="60dp"
         android:layout_height="30dp"
-        android:layout_x="83dp"
-        android:layout_y="421dp"
+        android:layout_x="101dp"
+        android:layout_y="429dp"
         android:background="@drawable/button_radius"
+        android:theme="@style/Theme.ButtonStyle.GREEN"
+        android:enabled="false"
         android:text="@string/choose_btn"
         android:textSize="8dp" />
 
@@ -48,30 +53,18 @@
         android:id="@+id/small_cabinet"
         android:layout_width="65dp"
         android:layout_height="20dp"
-        android:layout_x="80dp"
-        android:layout_y="395dp"
+        android:layout_x="98dp"
+        android:layout_y="403dp"
         android:gravity="center"
         android:textColor="@color/white"
         android:textSize="8dp" />
 
     <TextView
-        android:id="@+id/tiny_cabinet_bg"
-        android:layout_width="60dp"
-        android:layout_height="60dp"
-        android:layout_x="12dp"
-        android:layout_y="355dp"
-        android:background="@color/choose_cabinet_view"
-        android:gravity="center"
-        android:text="@string/tiny_cabinet"
-        android:textColor="@color/white"
-        android:textSize="10dp" />
-
-    <TextView
         android:id="@+id/tiny_cabinet"
         android:layout_width="60dp"
         android:layout_height="20dp"
-        android:layout_x="12dp"
-        android:layout_y="395dp"
+        android:layout_x="30dp"
+        android:layout_y="403dp"
         android:gravity="center"
         android:textColor="@color/white"
         android:textSize="8dp" />
@@ -80,9 +73,11 @@
         android:id="@+id/tiny_cabinet_btn"
         android:layout_width="60dp"
         android:layout_height="30dp"
-        android:layout_x="12dp"
-        android:layout_y="420dp"
+        android:layout_x="30dp"
+        android:layout_y="428dp"
         android:background="@drawable/button_radius"
+        android:theme="@style/Theme.ButtonStyle.GREEN"
+        android:enabled="false"
         android:text="@string/choose_btn"
         android:textSize="8dp" />
 
@@ -90,8 +85,8 @@
         android:id="@+id/big_cabinet_bg"
         android:layout_width="75dp"
         android:layout_height="75dp"
-        android:layout_x="234dp"
-        android:layout_y="340dp"
+        android:layout_x="252dp"
+        android:layout_y="348dp"
         android:background="@color/choose_cabinet_view"
         android:gravity="center"
         android:text="@string/big_cabinet"
@@ -102,8 +97,8 @@
         android:id="@+id/big_cabinet"
         android:layout_width="75dp"
         android:layout_height="20dp"
-        android:layout_x="234dp"
-        android:layout_y="395dp"
+        android:layout_x="252dp"
+        android:layout_y="403dp"
         android:gravity="center"
         android:textColor="@color/white"
         android:textSize="8dp" />
@@ -112,9 +107,11 @@
         android:id="@+id/big_cabinet_btn"
         android:layout_width="60dp"
         android:layout_height="30dp"
-        android:layout_x="240dp"
-        android:layout_y="420dp"
+        android:layout_x="258dp"
+        android:layout_y="428dp"
         android:background="@drawable/button_radius"
+        android:theme="@style/Theme.ButtonStyle.GREEN"
+        android:enabled="false"
         android:text="@string/choose_btn"
         android:textSize="8dp" />
 
@@ -122,8 +119,8 @@
         android:id="@+id/medium_cabinet_bg"
         android:layout_width="70dp"
         android:layout_height="70dp"
-        android:layout_x="154dp"
-        android:layout_y="345dp"
+        android:layout_x="172dp"
+        android:layout_y="353dp"
         android:background="@color/choose_cabinet_view"
         android:gravity="center"
         android:text="@string/medium_cabinet"
@@ -134,8 +131,8 @@
         android:id="@+id/medium_cabinet"
         android:layout_width="70dp"
         android:layout_height="20dp"
-        android:layout_x="154dp"
-        android:layout_y="395dp"
+        android:layout_x="172dp"
+        android:layout_y="403dp"
         android:gravity="center"
         android:textColor="@color/white"
         android:textSize="8dp" />
@@ -144,10 +141,23 @@
         android:id="@+id/medium_cabinet_btn"
         android:layout_width="60dp"
         android:layout_height="30dp"
-        android:layout_x="159dp"
-        android:layout_y="420dp"
+        android:layout_x="177dp"
+        android:layout_y="428dp"
         android:background="@drawable/button_radius"
+        android:theme="@style/Theme.ButtonStyle.GREEN"
+        android:enabled="false"
         android:text="@string/choose_btn"
         android:textSize="8dp" />
 
+    <Button
+        android:id="@+id/return_btn"
+        android:layout_width="60dp"
+        android:layout_height="30dp"
+        android:layout_x="31dp"
+        android:layout_y="528dp"
+        android:background="@drawable/button_radius"
+        android:text="@string/return_btn"
+        android:textSize="8dp"
+        android:theme="@style/Theme.ButtonStyle" />
+
 </AbsoluteLayout>

+ 22 - 20
app/src/main/res/layout/fragment_exception.xml

@@ -12,22 +12,34 @@
         android:layout_y="550dp"
         android:gravity="center"
         android:textSize="15dp" />
+
+    <Button
+        android:id="@+id/issue_cancel"
+        android:layout_width="90dp"
+        android:layout_height="50dp"
+        android:layout_x="69dp"
+        android:layout_y="456dp"
+        android:background="@drawable/button_radius"
+        android:text="@string/issue_cancel"
+        android:textSize="10dp" />
+
     <Button
         android:id="@+id/return_btn"
         android:layout_width="60dp"
         android:layout_height="30dp"
         android:layout_x="25dp"
-        android:layout_y="494dp"
+        android:layout_y="532dp"
         android:background="@drawable/button_radius"
         android:text="@string/return_btn"
-        android:textSize="8dp" />
+        android:textSize="8dp"
+        android:theme="@style/Theme.ButtonStyle" />
 
     <Button
         android:id="@+id/issue_open_again"
         android:layout_width="90dp"
         android:layout_height="50dp"
         android:layout_x="204dp"
-        android:layout_y="298dp"
+        android:layout_y="336dp"
         android:background="@drawable/button_radius"
         android:text="@string/issue_open_again"
         android:textSize="10dp" />
@@ -37,7 +49,7 @@
         android:layout_width="90dp"
         android:layout_height="50dp"
         android:layout_x="69dp"
-        android:layout_y="298dp"
+        android:layout_y="336dp"
         android:background="@drawable/button_radius"
         android:text="@string/issue_size"
         android:textSize="10dp" />
@@ -47,19 +59,19 @@
         android:layout_width="90dp"
         android:layout_height="50dp"
         android:layout_x="69dp"
-        android:layout_y="358dp"
+        android:layout_y="396dp"
         android:background="@drawable/button_radius"
         android:text="@string/issue_take_cancel"
         android:textSize="10dp" />
 
     <Button
-        android:id="@+id/issue_cancel"
+        android:id="@+id/issue_other"
         android:layout_width="90dp"
         android:layout_height="50dp"
-        android:layout_x="69dp"
-        android:layout_y="418dp"
+        android:layout_x="204dp"
+        android:layout_y="456dp"
         android:background="@drawable/button_radius"
-        android:text="@string/issue_cancel"
+        android:text="@string/issue_other"
         android:textSize="10dp" />
 
     <Button
@@ -67,19 +79,9 @@
         android:layout_width="90dp"
         android:layout_height="50dp"
         android:layout_x="204dp"
-        android:layout_y="358dp"
+        android:layout_y="396dp"
         android:background="@drawable/button_radius"
         android:text="@string/issue_door_not_open"
         android:textSize="10dp" />
 
-    <Button
-        android:id="@+id/issue_other"
-        android:layout_width="90dp"
-        android:layout_height="50dp"
-        android:layout_x="204dp"
-        android:layout_y="418dp"
-        android:background="@drawable/button_radius"
-        android:text="@string/issue_other"
-        android:textSize="10dp" />
-
 </AbsoluteLayout>

+ 41 - 39
app/src/main/res/layout/fragment_input_info.xml

@@ -12,6 +12,7 @@
         android:layout_x="25dp"
         android:layout_y="494dp"
         android:background="@drawable/button_radius"
+        android:theme="@style/Theme.ButtonStyle"
         android:text="@string/return_btn"
         android:textSize="8dp" />
 
@@ -19,8 +20,8 @@
         android:id="@+id/mail_no"
         android:layout_width="150dp"
         android:layout_height="50dp"
-        android:layout_x="10dp"
-        android:layout_y="325dp"
+        android:layout_x="27dp"
+        android:layout_y="339dp"
         android:ems="10"
         android:hint="@string/input_express_number"
         android:inputType="none"
@@ -28,20 +29,11 @@
         android:textSize="10dp" />
 
     <Button
-        android:id="@+id/input_button7"
-        android:layout_width="50dp"
-        android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="385dp"
-        android:text="@string/number_7"
-        android:textSize="10dp" />
-
-    <Button
         android:id="@+id/input_button8"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="211dp"
-        android:layout_y="385dp"
+        android:layout_x="228dp"
+        android:layout_y="399dp"
         android:text="@string/number_8"
         android:textSize="10dp" />
 
@@ -49,8 +41,8 @@
         android:id="@+id/input_button1"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="325dp"
+        android:layout_x="177dp"
+        android:layout_y="339dp"
         android:text="@string/number_1"
         android:textSize="10dp" />
 
@@ -58,8 +50,8 @@
         android:id="@+id/input_button2"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="211dp"
-        android:layout_y="325dp"
+        android:layout_x="228dp"
+        android:layout_y="339dp"
         android:text="@string/number_2"
         android:textSize="10dp" />
 
@@ -67,8 +59,8 @@
         android:id="@+id/input_button3"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="262dp"
-        android:layout_y="325dp"
+        android:layout_x="279dp"
+        android:layout_y="339dp"
         android:text="@string/number_3"
         android:textSize="10dp" />
 
@@ -76,8 +68,8 @@
         android:id="@+id/input_button5"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="211dp"
-        android:layout_y="355dp"
+        android:layout_x="228dp"
+        android:layout_y="369dp"
         android:text="@string/number_5"
         android:textSize="10dp" />
 
@@ -85,8 +77,8 @@
         android:id="@+id/input_button4"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="355dp"
+        android:layout_x="177dp"
+        android:layout_y="369dp"
         android:text="@string/number_4"
         android:textSize="10dp" />
 
@@ -94,8 +86,8 @@
         android:id="@+id/input_button_cancel"
         android:layout_width="101dp"
         android:layout_height="40dp"
-        android:layout_x="211dp"
-        android:layout_y="415dp"
+        android:layout_x="228dp"
+        android:layout_y="429dp"
         android:text="@string/cancel_btn"
         android:textSize="10dp" />
 
@@ -103,8 +95,8 @@
         android:id="@+id/input_button0"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="415dp"
+        android:layout_x="177dp"
+        android:layout_y="429dp"
         android:text="@string/number_0"
         android:textSize="10dp" />
 
@@ -112,17 +104,18 @@
         android:id="@+id/button_confirm"
         android:layout_width="152dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="445dp"
+        android:layout_x="177dp"
+        android:layout_y="459dp"
         android:text="@string/confirm_btn"
-        android:textSize="12dp" />
+        android:textSize="12dp"
+        android:theme="@style/Theme.ButtonStyle.CONFIRM" />
 
     <Button
         android:id="@+id/input_button6"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="262dp"
-        android:layout_y="355dp"
+        android:layout_x="279dp"
+        android:layout_y="369dp"
         android:text="@string/number_6"
         android:textSize="10dp" />
 
@@ -130,8 +123,8 @@
         android:id="@+id/input_button9"
         android:layout_width="50dp"
         android:layout_height="40dp"
-        android:layout_x="262dp"
-        android:layout_y="385dp"
+        android:layout_x="279dp"
+        android:layout_y="399dp"
         android:text="@string/number_9"
         android:textSize="10dp" />
 
@@ -139,13 +132,22 @@
         android:id="@+id/deliverer_phone_confirm"
         android:layout_width="150dp"
         android:layout_height="50dp"
-        android:layout_x="10dp"
-        android:layout_y="365dp"
+        android:layout_x="27dp"
+        android:layout_y="379dp"
         android:ems="10"
-        android:longClickable="false"
-        android:textSize="10dp"
         android:hint="@string/input_recipients_phone"
-        android:inputType="phone" />
+        android:inputType="phone"
+        android:longClickable="false"
+        android:textSize="10dp" />
+
+    <Button
+        android:id="@+id/input_button7"
+        android:layout_width="50dp"
+        android:layout_height="40dp"
+        android:layout_x="177dp"
+        android:layout_y="399dp"
+        android:text="@string/number_7"
+        android:textSize="10dp" />
 
     <TextView
         android:id="@+id/timeout"

+ 18 - 16
app/src/main/res/layout/fragment_main.xml

@@ -7,43 +7,45 @@
         android:id="@+id/fast_take_send_bg"
         android:layout_width="160dp"
         android:layout_height="250dp"
-        android:layout_x="162dp"
-        android:layout_y="314dp"
+        android:layout_x="165dp"
+        android:layout_y="328dp"
         android:background="@drawable/textview_border"
         android:gravity="center_horizontal"
         android:paddingTop="15dp"
         android:text="@string/fast_take_or_send"
         android:textSize="20sp" />
 
+    <TextView
+        android:id="@+id/fast_take_send"
+        android:layout_width="134dp"
+        android:layout_height="135dp"
+        android:layout_x="177dp"
+        android:layout_y="385dp"
+        android:background="@drawable/e_mp_qrcode_8x8_backup" />
+
     <Button
         android:id="@+id/send_btn"
         android:layout_width="120dp"
         android:layout_height="70dp"
-        android:layout_x="29dp"
-        android:layout_y="363dp"
+        android:layout_x="32dp"
+        android:layout_y="377dp"
         android:background="@drawable/button_radius"
         android:text="@string/send_btn"
         android:textSize="20sp"
-        android:textStyle="bold" />
+        android:textStyle="bold"
+        android:theme="@style/Theme.ButtonStyle.GREEN" />
 
     <Button
         android:id="@+id/take_btn"
         android:layout_width="120dp"
         android:layout_height="70dp"
-        android:layout_x="29dp"
-        android:layout_y="463dp"
+        android:layout_x="32dp"
+        android:layout_y="477dp"
         android:background="@drawable/button_radius"
         android:text="@string/take_btn"
         android:textSize="20sp"
-        android:textStyle="bold" />
-
-    <TextView
-        android:id="@+id/fast_take_send"
-        android:layout_width="134dp"
-        android:layout_height="135dp"
-        android:layout_x="174dp"
-        android:layout_y="371dp"
-        android:background="@drawable/e_mp_qrcode_8x8_backup" />
+        android:textStyle="bold"
+        android:theme="@style/Theme.ButtonStyle.GREEN" />
 
 
 </AbsoluteLayout>

+ 53 - 52
app/src/main/res/layout/fragment_send.xml

@@ -5,58 +5,49 @@
     android:focusable="true"
     android:focusableInTouchMode="true">
 
+    <!--  投递员密码  -->
+
+    <!--  投递员手机号  -->
+
+
     <Button
         android:id="@+id/return_btn"
         android:layout_width="60dp"
         android:layout_height="30dp"
-        android:layout_x="25dp"
-        android:layout_y="494dp"
+        android:layout_x="28dp"
+        android:layout_y="556dp"
         android:background="@drawable/button_radius"
         android:text="@string/return_btn"
-        android:textSize="8dp" />
-
-    <!--  投递员密码  -->
-
-    <!--  投递员手机号  -->
-
-
+        android:textSize="8dp"
+        android:theme="@style/Theme.ButtonStyle" />
 
     <EditText
         android:id="@+id/editTextTextPersonName4"
         android:layout_width="150dp"
         android:layout_height="50dp"
-        android:layout_x="10dp"
-        android:layout_y="325dp"
-        android:textSize="10dp"
-        android:longClickable="false"
+        android:layout_x="25dp"
+        android:layout_y="351dp"
         android:ems="15"
         android:hint="@string/input_send_phone"
-        android:inputType="number" />
+        android:inputType="number"
+        android:longClickable="false"
+        android:textSize="10dp" />
 
     <Button
         android:id="@+id/input_button7"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="385dp"
+        android:layout_x="175dp"
+        android:layout_y="411dp"
         android:text="@string/number_7"
         android:textSize="10dp" />
 
     <Button
-        android:id="@+id/input_button8"
-        android:layout_width="48dp"
-        android:layout_height="40dp"
-        android:layout_x="211dp"
-        android:layout_y="385dp"
-        android:text="@string/number_8"
-        android:textSize="10dp" />
-
-    <Button
         android:id="@+id/input_button1"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="325dp"
+        android:layout_x="175dp"
+        android:layout_y="351dp"
         android:text="@string/number_1"
         android:textSize="10dp" />
 
@@ -64,8 +55,8 @@
         android:id="@+id/input_button2"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="211dp"
-        android:layout_y="325dp"
+        android:layout_x="226dp"
+        android:layout_y="351dp"
         android:text="@string/number_2"
         android:textSize="10dp" />
 
@@ -73,8 +64,8 @@
         android:id="@+id/input_button3"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="262dp"
-        android:layout_y="325dp"
+        android:layout_x="277dp"
+        android:layout_y="351dp"
         android:text="@string/number_3"
         android:textSize="10dp" />
 
@@ -82,8 +73,8 @@
         android:id="@+id/input_button5"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="211dp"
-        android:layout_y="355dp"
+        android:layout_x="226dp"
+        android:layout_y="381dp"
         android:text="@string/number_5"
         android:textSize="10dp" />
 
@@ -91,17 +82,17 @@
         android:id="@+id/input_button4"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="355dp"
+        android:layout_x="175dp"
+        android:layout_y="381dp"
         android:text="@string/number_4"
         android:textSize="10dp" />
 
     <Button
         android:id="@+id/input_button_cancel"
-        android:layout_width="100dp"
+        android:layout_width="99dp"
         android:layout_height="40dp"
-        android:layout_x="211dp"
-        android:layout_y="415dp"
+        android:layout_x="226dp"
+        android:layout_y="441dp"
         android:text="@string/cancel_btn"
         android:textSize="10dp" />
 
@@ -109,8 +100,8 @@
         android:id="@+id/input_button0"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="415dp"
+        android:layout_x="175dp"
+        android:layout_y="441dp"
         android:text="@string/number_0"
         android:textSize="10dp" />
 
@@ -118,17 +109,18 @@
         android:id="@+id/input_button_confirm"
         android:layout_width="150dp"
         android:layout_height="40dp"
-        android:layout_x="160dp"
-        android:layout_y="445dp"
+        android:layout_x="175dp"
+        android:layout_y="471dp"
         android:text="@string/confirm_btn"
-        android:textSize="10dp" />
+        android:textSize="10dp"
+        android:theme="@style/Theme.ButtonStyle.CONFIRM" />
 
     <Button
         android:id="@+id/input_button6"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="262dp"
-        android:layout_y="355dp"
+        android:layout_x="277dp"
+        android:layout_y="381dp"
         android:text="@string/number_6"
         android:textSize="10dp" />
 
@@ -136,8 +128,8 @@
         android:id="@+id/input_button9"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="262dp"
-        android:layout_y="385dp"
+        android:layout_x="277dp"
+        android:layout_y="411dp"
         android:text="@string/number_9"
         android:textSize="10dp" />
 
@@ -145,13 +137,22 @@
         android:id="@+id/editTextTextPersonName5"
         android:layout_width="150dp"
         android:layout_height="50dp"
-        android:layout_x="10dp"
-        android:layout_y="365dp"
-        android:textSize="10dp"
-        android:longClickable="false"
+        android:layout_x="25dp"
+        android:layout_y="391dp"
         android:ems="15"
         android:hint="@string/input_send_password"
-        android:inputType="numberPassword" />
+        android:inputType="numberPassword"
+        android:longClickable="false"
+        android:textSize="10dp" />
+
+    <Button
+        android:id="@+id/input_button8"
+        android:layout_width="48dp"
+        android:layout_height="40dp"
+        android:layout_x="226dp"
+        android:layout_y="411dp"
+        android:text="@string/number_8"
+        android:textSize="10dp" />
 
     <TextView
         android:id="@+id/timeout"

+ 42 - 41
app/src/main/res/layout/fragment_send_info_confirm.xml

@@ -10,6 +10,7 @@
         android:layout_x="16dp"
         android:layout_y="560dp"
         android:background="@drawable/button_radius"
+        android:theme="@style/Theme.ButtonStyle"
         android:text="@string/return_main_btn"
         android:textSize="8dp" />
 
@@ -26,38 +27,18 @@
         android:id="@+id/open_cabinet_hint1"
         android:layout_width="200dp"
         android:layout_height="50dp"
-        android:layout_x="65dp"
-        android:layout_y="281dp"
+        android:layout_x="81dp"
+        android:layout_y="286dp"
         android:gravity="center"
         android:text="@string/open_cabinet_hint_ok"
         android:textSize="30dp" />
 
-    <Button
-        android:id="@+id/none_send"
-        android:layout_width="80dp"
-        android:layout_height="40dp"
-        android:layout_x="185dp"
-        android:layout_y="511dp"
-        android:background="@drawable/button_radius"
-        android:text="@string/none_send"
-        android:textSize="12dp" />
-
-    <TextView
-        android:id="@+id/take_number_hint"
-        android:layout_width="100dp"
-        android:layout_height="40dp"
-        android:layout_x="65dp"
-        android:layout_y="471dp"
-        android:gravity="center"
-        android:text="@string/take_number_hint"
-        android:textSize="15dp" />
-
     <TextView
         android:id="@+id/open_cabinet_hint2"
         android:layout_width="200dp"
         android:layout_height="50dp"
-        android:layout_x="65dp"
-        android:layout_y="381dp"
+        android:layout_x="81dp"
+        android:layout_y="386dp"
         android:gravity="center"
         android:text="@string/open_cabinet_hint"
         android:textSize="15dp" />
@@ -66,8 +47,8 @@
         android:id="@+id/take_no_hint"
         android:layout_width="100dp"
         android:layout_height="40dp"
-        android:layout_x="65dp"
-        android:layout_y="431dp"
+        android:layout_x="81dp"
+        android:layout_y="436dp"
         android:gravity="center"
         android:text="@string/take_no_hint"
         android:textSize="15dp" />
@@ -76,8 +57,8 @@
         android:id="@+id/take_no"
         android:layout_width="100dp"
         android:layout_height="40dp"
-        android:layout_x="165dp"
-        android:layout_y="431dp"
+        android:layout_x="181dp"
+        android:layout_y="436dp"
         android:gravity="center"
         android:text="@string/take_no"
         android:textSize="15dp" />
@@ -86,8 +67,8 @@
         android:id="@+id/take_number"
         android:layout_width="100dp"
         android:layout_height="40dp"
-        android:layout_x="165dp"
-        android:layout_y="471dp"
+        android:layout_x="181dp"
+        android:layout_y="476dp"
         android:gravity="center"
         android:text="@string/take_number"
         android:textSize="15dp" />
@@ -96,31 +77,51 @@
         android:id="@+id/open_cabinet_no"
         android:layout_width="200dp"
         android:layout_height="50dp"
-        android:layout_x="65dp"
-        android:layout_y="331dp"
+        android:layout_x="81dp"
+        android:layout_y="336dp"
         android:gravity="center"
         android:text="@string/open_cabinet_no"
         android:textColor="@color/cardview_dark_background"
         android:textSize="40dp" />
 
     <Button
-        android:id="@+id/exception_btn"
+        android:id="@+id/already_send"
         android:layout_width="80dp"
         android:layout_height="40dp"
-        android:layout_x="-15dp"
-        android:layout_y="285dp"
+        android:layout_x="81dp"
+        android:layout_y="516dp"
         android:background="@drawable/button_radius"
-        android:text="@string/exception_btn"
-        android:textSize="8dp" />
+        android:text="@string/already_send"
+        android:textSize="12dp" />
 
     <Button
-        android:id="@+id/already_send"
+        android:id="@+id/none_send"
         android:layout_width="80dp"
         android:layout_height="40dp"
-        android:layout_x="65dp"
-        android:layout_y="511dp"
+        android:layout_x="201dp"
+        android:layout_y="516dp"
         android:background="@drawable/button_radius"
-        android:text="@string/already_send"
+        android:text="@string/none_send"
         android:textSize="12dp" />
 
+    <TextView
+        android:id="@+id/take_number_hint"
+        android:layout_width="100dp"
+        android:layout_height="40dp"
+        android:layout_x="81dp"
+        android:layout_y="476dp"
+        android:gravity="center"
+        android:text="@string/take_number_hint"
+        android:textSize="15dp" />
+
+    <Button
+        android:id="@+id/exception_btn"
+        android:layout_width="80dp"
+        android:layout_height="40dp"
+        android:layout_x="-15dp"
+        android:layout_y="285dp"
+        android:background="@drawable/button_radius"
+        android:text="@string/exception_btn"
+        android:textSize="8dp" />
+
 </AbsoluteLayout>

+ 1 - 0
app/src/main/res/layout/fragment_send_main.xml

@@ -19,6 +19,7 @@
         android:layout_x="25dp"
         android:layout_y="494dp"
         android:background="@drawable/button_radius"
+        android:theme="@style/Theme.ButtonStyle"
         android:text="@string/return_btn"
         android:textSize="8dp" />
 

+ 13 - 10
app/src/main/res/layout/fragment_send_success.xml

@@ -19,6 +19,7 @@
         android:layout_x="25dp"
         android:layout_y="494dp"
         android:background="@drawable/button_radius"
+        android:theme="@style/Theme.ButtonStyle"
         android:text="@string/return_main_btn"
         android:textSize="8dp" />
 
@@ -26,30 +27,32 @@
         android:id="@+id/textView4"
         android:layout_width="250dp"
         android:layout_height="60dp"
-        android:layout_x="50dp"
-        android:layout_y="318dp"
+        android:layout_x="62dp"
+        android:layout_y="320dp"
         android:gravity="center_horizontal"
         android:text="@string/send_success"
         android:textSize="35dp" />
 
     <Button
-        android:id="@+id/exit_account_btn"
+        android:id="@+id/continue_send_btn"
         android:layout_width="100dp"
         android:layout_height="50dp"
-        android:layout_x="182dp"
-        android:layout_y="429dp"
+        android:layout_x="74dp"
+        android:layout_y="431dp"
         android:background="@drawable/button_radius"
-        android:text="@string/exit_account"
+        android:theme="@style/Theme.ButtonStyle.GREEN"
+        android:text="@string/continue_send"
         android:textSize="15dp" />
 
     <Button
-        android:id="@+id/continue_send_btn"
+        android:id="@+id/exit_account_btn"
         android:layout_width="100dp"
         android:layout_height="50dp"
-        android:layout_x="62dp"
-        android:layout_y="429dp"
+        android:layout_x="194dp"
+        android:layout_y="431dp"
         android:background="@drawable/button_radius"
-        android:text="@string/continue_send"
+        android:theme="@style/Theme.ButtonStyle.GREEN"
+        android:text="@string/exit_account"
         android:textSize="15dp" />
 
 </AbsoluteLayout>

+ 26 - 23
app/src/main/res/layout/fragment_take.xml

@@ -10,34 +10,25 @@
         android:layout_y="550dp"
         android:gravity="center"
         android:textSize="15dp" />
+
     <TextView
         android:id="@+id/fast_take_send_bg1"
         android:layout_width="160dp"
         android:layout_height="250dp"
-        android:layout_x="15dp"
-        android:layout_y="295dp"
+        android:layout_x="26dp"
+        android:layout_y="305dp"
         android:background="@drawable/textview_border"
         android:gravity="center_horizontal"
         android:paddingTop="15dp"
         android:text="@string/wx_scan_take"
         android:textSize="20dp" />
 
-    <Button
-        android:id="@+id/return_btn"
-        android:layout_width="60dp"
-        android:layout_height="30dp"
-        android:layout_x="31dp"
-        android:layout_y="551dp"
-        android:background="@drawable/button_radius"
-        android:text="@string/return_btn"
-        android:textSize="8dp" />
-
     <TextView
         android:id="@+id/textView3"
         android:layout_width="140dp"
         android:layout_height="50dp"
-        android:layout_x="186dp"
-        android:layout_y="353dp"
+        android:layout_x="197dp"
+        android:layout_y="363dp"
         android:gravity="center"
         android:text="@string/prompt_word_bottom"
         android:textSize="15dp"
@@ -47,29 +38,41 @@
         android:id="@+id/textView2"
         android:layout_width="140dp"
         android:layout_height="50dp"
-        android:layout_x="186dp"
-        android:layout_y="309dp"
+        android:layout_x="197dp"
+        android:layout_y="319dp"
         android:gravity="center"
-        android:textStyle="bold"
         android:text="@string/prompt_word_top"
-        android:textSize="15dp" />
+        android:textSize="15dp"
+        android:textStyle="bold" />
 
     <TextView
         android:id="@+id/textView"
         android:layout_width="134dp"
         android:layout_height="135dp"
-        android:layout_x="27dp"
-        android:layout_y="352dp"
+        android:layout_x="38dp"
+        android:layout_y="362dp"
         android:background="@drawable/e_mp_qrcode_8x8_backup" />
 
     <Button
         android:id="@+id/to_input_take_code_btn"
         android:layout_width="130dp"
         android:layout_height="50dp"
-        android:layout_x="186dp"
-        android:layout_y="461dp"
+        android:layout_x="197dp"
+        android:layout_y="471dp"
         android:background="@drawable/button_radius"
         android:text="@string/android_take"
-        android:textSize="20dp" />
+        android:textSize="15dp"
+        android:theme="@style/Theme.ButtonStyle.GREEN" />
+
+    <Button
+        android:id="@+id/return_btn"
+        android:layout_width="60dp"
+        android:layout_height="30dp"
+        android:layout_x="42dp"
+        android:layout_y="561dp"
+        android:background="@drawable/button_radius"
+        android:text="@string/return_btn"
+        android:textSize="8dp"
+        android:theme="@style/Theme.ButtonStyle" />
 
 </AbsoluteLayout>

+ 27 - 25
app/src/main/res/layout/fragment_take_code.xml

@@ -18,7 +18,7 @@
         android:id="@+id/fast_take_send_bg1"
         android:layout_width="160dp"
         android:layout_height="250dp"
-        android:layout_x="14dp"
+        android:layout_x="19dp"
         android:layout_y="317dp"
         android:background="@drawable/textview_border"
         android:gravity="center_horizontal"
@@ -26,20 +26,11 @@
         android:text="@string/wx_scan_take"
         android:textSize="20dp" />
 
-    <Button
-        android:id="@+id/take_input_button1"
-        android:layout_width="48dp"
-        android:layout_height="40dp"
-        android:layout_x="177dp"
-        android:layout_y="377dp"
-        android:text="@string/number_1"
-        android:textSize="10dp" />
-
     <TextView
         android:id="@+id/textView"
         android:layout_width="134dp"
         android:layout_height="135dp"
-        android:layout_x="28dp"
+        android:layout_x="33dp"
         android:layout_y="374dp"
         android:background="@drawable/e_mp_qrcode_8x8_backup" />
 
@@ -47,7 +38,7 @@
         android:id="@+id/take_input_button_cancel"
         android:layout_width="98dp"
         android:layout_height="40dp"
-        android:layout_x="227dp"
+        android:layout_x="232dp"
         android:layout_y="467dp"
         android:text="@string/cancel_btn"
         android:textSize="10dp" />
@@ -56,7 +47,7 @@
         android:id="@+id/take_input_button4"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="177dp"
+        android:layout_x="182dp"
         android:layout_y="407dp"
         android:text="@string/number_4"
         android:textSize="10dp" />
@@ -65,7 +56,7 @@
         android:id="@+id/editTextTextPersonName6"
         android:layout_width="148dp"
         android:layout_height="50dp"
-        android:layout_x="177dp"
+        android:layout_x="182dp"
         android:layout_y="327dp"
         android:ems="15"
         android:hint="@string/input_take_code"
@@ -77,7 +68,7 @@
         android:id="@+id/take_input_button2"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="227dp"
+        android:layout_x="232dp"
         android:layout_y="377dp"
         android:text="@string/number_2"
         android:textSize="10dp" />
@@ -86,7 +77,7 @@
         android:id="@+id/take_input_button7"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="177dp"
+        android:layout_x="182dp"
         android:layout_y="437dp"
         android:text="@string/number_7"
         android:textSize="10dp" />
@@ -95,7 +86,7 @@
         android:id="@+id/take_input_button9"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="277dp"
+        android:layout_x="282dp"
         android:layout_y="437dp"
         android:text="@string/number_9"
         android:textSize="10dp" />
@@ -104,7 +95,7 @@
         android:id="@+id/take_input_button6"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="277dp"
+        android:layout_x="282dp"
         android:layout_y="407dp"
         android:text="@string/number_6"
         android:textSize="10dp" />
@@ -113,7 +104,7 @@
         android:id="@+id/take_input_button3"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="277dp"
+        android:layout_x="282dp"
         android:layout_y="377dp"
         android:text="@string/number_3"
         android:textSize="10dp" />
@@ -122,7 +113,7 @@
         android:id="@+id/take_input_button8"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="227dp"
+        android:layout_x="232dp"
         android:layout_y="437dp"
         android:text="@string/number_8"
         android:textSize="10dp" />
@@ -131,7 +122,7 @@
         android:id="@+id/take_input_button5"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="227dp"
+        android:layout_x="232dp"
         android:layout_y="407dp"
         android:text="@string/number_5"
         android:textSize="10dp" />
@@ -140,17 +131,18 @@
         android:id="@+id/return_btn"
         android:layout_width="60dp"
         android:layout_height="30dp"
-        android:layout_x="36dp"
+        android:layout_x="41dp"
         android:layout_y="571dp"
         android:background="@drawable/button_radius"
         android:text="@string/return_btn"
-        android:textSize="8dp" />
+        android:textSize="8dp"
+        android:theme="@style/Theme.ButtonStyle" />
 
     <Button
         android:id="@+id/take_input_button0"
         android:layout_width="48dp"
         android:layout_height="40dp"
-        android:layout_x="177dp"
+        android:layout_x="182dp"
         android:layout_y="467dp"
         android:text="@string/number_0"
         android:textSize="10dp" />
@@ -159,9 +151,19 @@
         android:id="@+id/take_input_button_confirm"
         android:layout_width="148dp"
         android:layout_height="40dp"
-        android:layout_x="177dp"
+        android:layout_x="182dp"
         android:layout_y="497dp"
         android:text="@string/confirm_btn"
+        android:textSize="10dp"
+        android:theme="@style/Theme.ButtonStyle.CONFIRM" />
+
+    <Button
+        android:id="@+id/take_input_button1"
+        android:layout_width="48dp"
+        android:layout_height="40dp"
+        android:layout_x="182dp"
+        android:layout_y="377dp"
+        android:text="@string/number_1"
         android:textSize="10dp" />
 
 </AbsoluteLayout>

+ 22 - 21
app/src/main/res/layout/fragment_take_success.xml

@@ -18,8 +18,8 @@
         android:id="@+id/open_cabinet_hint3"
         android:layout_width="200dp"
         android:layout_height="50dp"
-        android:layout_x="61dp"
-        android:layout_y="298dp"
+        android:layout_x="88dp"
+        android:layout_y="332dp"
         android:gravity="center_horizontal"
         android:text="@string/open_cabinet_hint_ok"
         android:textSize="30dp" />
@@ -28,28 +28,19 @@
         android:id="@+id/return_main_btn"
         android:layout_width="60dp"
         android:layout_height="30dp"
-        android:layout_x="25dp"
-        android:layout_y="506dp"
+        android:layout_x="52dp"
+        android:layout_y="540dp"
         android:background="@drawable/button_radius"
         android:text="@string/return_main_btn"
-        android:textSize="6dp" />
-
-    <Button
-        android:id="@+id/continue_take_btn"
-        android:layout_width="80dp"
-        android:layout_height="40dp"
-        android:layout_x="182dp"
-        android:layout_y="464dp"
-        android:background="@drawable/button_radius"
-        android:text="@string/continue_take"
-        android:textSize="10dp" />
+        android:textSize="6dp"
+        android:theme="@style/Theme.ButtonStyle" />
 
     <Button
         android:id="@+id/re_open_cabinet_btn"
         android:layout_width="80dp"
         android:layout_height="40dp"
-        android:layout_x="62dp"
-        android:layout_y="464dp"
+        android:layout_x="89dp"
+        android:layout_y="498dp"
         android:background="@drawable/button_radius"
         android:text="@string/re_open_cabinet"
         android:textSize="10dp" />
@@ -58,8 +49,8 @@
         android:id="@+id/open_cabinet_count_down_hint"
         android:layout_width="200dp"
         android:layout_height="50dp"
-        android:layout_x="62dp"
-        android:layout_y="408dp"
+        android:layout_x="89dp"
+        android:layout_y="442dp"
         android:gravity="center"
         android:textSize="15dp" />
 
@@ -67,11 +58,21 @@
         android:id="@+id/open_cabinet_hint_no"
         android:layout_width="200dp"
         android:layout_height="60dp"
-        android:layout_x="61dp"
-        android:layout_y="348dp"
+        android:layout_x="88dp"
+        android:layout_y="382dp"
         android:gravity="center"
         android:text="006"
         android:textSize="50dp"
         android:textStyle="bold" />
 
+    <Button
+        android:id="@+id/continue_take_btn"
+        android:layout_width="80dp"
+        android:layout_height="40dp"
+        android:layout_x="209dp"
+        android:layout_y="498dp"
+        android:background="@drawable/button_radius"
+        android:text="@string/continue_take"
+        android:textSize="10dp" />
+
 </AbsoluteLayout>

+ 8 - 4
app/src/main/res/values/colors.xml

@@ -1,15 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <color name="purple_200">#FFBB86FC</color>
-    <color name="purple_500">#FF6200EE</color>
-    <color name="purple_700">#FF3700B3</color>
+    <!--    <color name="purple_500">#FF6200EE</color>-->
+    <color name="purple_500">#c9dd22</color>
+    <color name="purple_700">#c9dd22</color>
     <color name="teal_200">#FF03DAC5</color>
     <color name="teal_700">#FF018786</color>
     <color name="black">#FF000000</color>
     <color name="white">#FFFFFFFF</color>
-    <color name="send_btn">#44CE3B</color>
+    <color name="send_btn">#75FF90</color>
     <color name="take_btn">#EBBA3A</color>
     <color name="main_label_bg">#4E4C4D</color>
     <color name="choose_cabinet_view">#9DDA99</color>
-
+    <color name="input_confirm">#20E45E</color>
+    <color name="confirm_btn">#0eb83a</color>
+    <color name="return_color">#c9dd22</color>
+    <color name="status_bar_color">#798E91</color>
 </resources>

+ 7 - 7
app/src/main/res/values/strings.xml

@@ -26,7 +26,7 @@
     <string name="input_recipients_phone">请输入收件人手机号</string>
     <string name="input_express_number">扫描快递单号</string>
     <string name="input_take_code">请输入取件码</string>
-    <string name="android_take">终端取件</string>
+    <string name="android_take">取件码取件</string>
     <string name="wx_scan_take">微信扫码取件</string>
     <string name="prompt_word_top">为预防接触风险!</string>
     <string name="prompt_word_bottom">请使用微信扫码取件</string>
@@ -40,12 +40,12 @@
     <string name="big_cabinet">大柜</string>
     <string name="choose_btn">选择</string>
     <string name="choose_cabinet">选择柜子类型</string>
-    <string name="issue_size">尺寸不合适换个柜子</string>
-    <string name="issue_door_not_open">门没开换个柜门</string>
-    <string name="issue_open_again">再开一次调整快件</string>
-    <string name="issue_cancel">未投件取消投件</string>
-    <string name="issue_take_cancel">拿出快件取消投递</string>
-    <string name="issue_other">其它问题请联系我们</string>
+    <string name="issue_size">尺寸不合适\n换个柜子</string>
+    <string name="issue_door_not_open">门没开\n换个柜门</string>
+    <string name="issue_open_again">再开一次\n调整快件</string>
+    <string name="issue_cancel">未投件\n取消投件</string>
+    <string name="issue_take_cancel">拿出快件\n取消投递</string>
+    <string name="issue_other">其它问题\n请联系我们</string>
     <string name="issue_page">常见问题</string>
     <string name="open_cabinet_hint_ok">柜门已打开</string>
     <string name="open_cabinet_hint_error">柜门打开失败</string>

+ 14 - 1
app/src/main/res/values/themes.xml

@@ -30,7 +30,20 @@
         <item name="windowActionBar">false</item>
         <item name="windowNoTitle">true</item>
     </style>
-
+    <!-- 返回键 -->
+    <style name="Theme.ButtonStyle" parent="Theme.MaterialComponents.Light.NoActionBar">
+        <item name="colorPrimary">@color/return_color</item>
+        <item name="colorPrimaryVariant">@color/main_label_bg</item>
+        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
+    </style>
+    <!-- 部分按钮 -->
+    <style name="Theme.ButtonStyle.GREEN" parent="Theme.MaterialComponents.Light.NoActionBar">
+        <item name="colorPrimary">@color/confirm_btn</item>
+    </style>
+    <!-- 确认按钮 -->
+    <style name="Theme.ButtonStyle.CONFIRM" parent="Theme.MaterialComponents.Light.NoActionBar">
+        <item name="colorPrimary">@color/input_confirm</item>
+    </style>
     <style name="Theme.Ichandroid.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
 
     <style name="Theme.Ichandroid.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />