Kaynağa Gözat

1.新增开锁页面
2.新增化学品数据结构变更

JaycePC 11 ay önce
ebeveyn
işleme
1f479e0976
23 değiştirilmiş dosya ile 1419 ekleme ve 7 silme
  1. 40 0
      app/build.gradle
  2. 31 0
      app/src/main/java/com/example/chemical/ui/plan/room/bean/locker/HxpLabCabinetListVo.java
  3. 39 0
      app/src/main/java/com/example/chemical/ui/plan/room/bean/locker/HxpLabDirector.java
  4. 36 0
      app/src/main/java/com/example/chemical/ui/plan/room/bean/locker/HxpLabSafe.java
  5. 25 0
      app/src/main/java/com/example/chemical/ui/plan/room/dao/HxpLabDirectorDAO.java
  6. 22 0
      app/src/main/java/com/example/chemical/ui/plan/room/dao/HxpLabSafeDAO.java
  7. 92 0
      app/src/main/java/com/example/chemical/ui/plan/unlock/UnlockActivity.java
  8. 108 0
      app/src/main/java/com/example/chemical/ui/plan/unlock/UnlockAdapter.java
  9. 139 0
      app/src/main/java/com/example/chemical/ui/verify/DoubleVerifyActivity.java
  10. 5 0
      app/src/main/java/com/example/chemical/ui/verify/OnDataToFragmentListener.java
  11. 7 0
      app/src/main/java/com/example/chemical/ui/verify/fragment/DetectType.java
  12. 0 7
      app/src/main/java/com/example/chemical/ui/verify/fragment/FaceDetectFragment.java
  13. 12 0
      app/src/main/res/drawable/shap_rectangle_dash.xml
  14. 8 0
      app/src/main/res/drawable/shape_unlock_failed.xml
  15. 8 0
      app/src/main/res/drawable/shape_unlock_success.xml
  16. 330 0
      app/src/main/res/layout/activity_double_verify.xml
  17. 360 0
      app/src/main/res/layout/activity_unlock.xml
  18. 27 0
      app/src/main/res/layout/fragment_face_detect.xml
  19. 130 0
      app/src/main/res/layout/item_door_unlock.xml
  20. BIN
      app/src/main/res/mipmap-xhdpi/icon_sy_cwts.png
  21. BIN
      app/src/main/res/mipmap-xhdpi/icon_sy_ts.png
  22. BIN
      app/src/main/res/mipmap-xhdpi/img_dkm.png
  23. BIN
      app/src/main/res/mipmap-xhdpi/img_skm.png

+ 40 - 0
app/build.gradle

@@ -139,4 +139,44 @@ dependencies {
     annotationProcessor "androidx.room:room-compiler:2.2.6"
 
     implementation 'com.airbnb.android:lottie:3.7.0'
+    implementation 'com.google.mlkit:face-detection:16.0.0'
+    implementation 'com.otaliastudios:cameraview:2.7.2'
+
+    //公共库 (*必须)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-common:1.8.0'
+
+//--------------------------
+
+////条码识别 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-barcode-scanning:2.3.0'
+
+//人脸检测 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-face-detection:1.8.0'
+//
+////人脸网格检测 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-face-mesh-detection:2.3.0'
+//
+////图像标签 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-image-labeling:2.3.0'
+//
+////对象检测 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-object-detection:2.3.0'
+//
+////姿势检测 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-pose-detection:2.3.0'
+//
+////姿势检测精确版 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-pose-detection-accurate:2.3.0'
+//
+////自拍分割 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-segmentation-selfie:2.3.0'
+//
+////文字识别 (可选)
+//    implementation 'com.github.jenly1314.MLKit:mlkit-text-recognition:2.3.0'
+    def camerax_version = "1.0.0"
+    implementation "androidx.camera:camera-core:${camerax_version}"
+    implementation "androidx.camera:camera-camera2:${camerax_version}"
+    implementation "androidx.camera:camera-lifecycle:${camerax_version}"
+    implementation "androidx.camera:camera-view:1.0.0-alpha28"
+    implementation "androidx.camera:camera-extensions:1.0.0-alpha28"
 }

+ 31 - 0
app/src/main/java/com/example/chemical/ui/plan/room/bean/locker/HxpLabCabinetListVo.java

@@ -0,0 +1,31 @@
+package com.example.chemical.ui.plan.room.bean.locker;
+
+public class HxpLabCabinetListVo {
+    private int code;
+    private String message;
+    private HxpLabCabinetVo data;
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public HxpLabCabinetVo getData() {
+        return data;
+    }
+
+    public void setData(HxpLabCabinetVo data) {
+        this.data = data;
+    }
+}

+ 39 - 0
app/src/main/java/com/example/chemical/ui/plan/room/bean/locker/HxpLabDirector.java

@@ -0,0 +1,39 @@
+package com.example.chemical.ui.plan.room.bean.locker;
+
+import androidx.room.Entity;
+import androidx.room.PrimaryKey;
+
+/**
+ * 实验室负责人
+ */
+@Entity
+public class HxpLabDirector {
+    @PrimaryKey
+    private long userId;
+    private String userName;
+    private String mobile;
+
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+}

+ 36 - 0
app/src/main/java/com/example/chemical/ui/plan/room/bean/locker/HxpLabSafe.java

@@ -0,0 +1,36 @@
+package com.example.chemical.ui.plan.room.bean.locker;
+
+import androidx.room.Entity;
+import androidx.room.PrimaryKey;
+
+@Entity
+public class HxpLabSafe {
+    @PrimaryKey
+    private long userId;
+    private String userName;
+    private String mobile;
+
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+}

+ 25 - 0
app/src/main/java/com/example/chemical/ui/plan/room/dao/HxpLabDirectorDAO.java

@@ -0,0 +1,25 @@
+package com.example.chemical.ui.plan.room.dao;
+
+import androidx.room.Dao;
+import androidx.room.Delete;
+import androidx.room.Insert;
+import androidx.room.OnConflictStrategy;
+import androidx.room.Query;
+import androidx.room.Update;
+
+import com.example.chemical.ui.plan.room.bean.locker.HxpCabinetVo;
+import com.example.chemical.ui.plan.room.bean.locker.HxpLabCabinetVo;
+import com.example.chemical.ui.plan.room.bean.locker.HxpLabDirector;
+
+import java.util.List;
+
+@Dao
+public interface HxpLabDirectorDAO {
+
+    @Insert(onConflict = OnConflictStrategy.REPLACE)
+    void insertAll(List<HxpLabDirector> users);
+
+    @Query("SELECT * FROM hxplabdirector")
+    List<HxpLabDirector> getAll();
+
+}

+ 22 - 0
app/src/main/java/com/example/chemical/ui/plan/room/dao/HxpLabSafeDAO.java

@@ -0,0 +1,22 @@
+package com.example.chemical.ui.plan.room.dao;
+
+import androidx.room.Dao;
+import androidx.room.Insert;
+import androidx.room.OnConflictStrategy;
+import androidx.room.Query;
+
+import com.example.chemical.ui.plan.room.bean.locker.HxpLabDirector;
+import com.example.chemical.ui.plan.room.bean.locker.HxpLabSafe;
+
+import java.util.List;
+
+@Dao
+public interface HxpLabSafeDAO {
+
+    @Insert(onConflict = OnConflictStrategy.REPLACE)
+    void insertAll(List<HxpLabSafe> users);
+
+    @Query("SELECT * FROM hxplabsafe")
+    List<HxpLabSafe> getAll();
+
+}

+ 92 - 0
app/src/main/java/com/example/chemical/ui/plan/unlock/UnlockActivity.java

@@ -0,0 +1,92 @@
+package com.example.chemical.ui.plan.unlock;
+
+import android.os.Bundle;
+import android.view.View;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.blankj.utilcode.util.ActivityUtils;
+import com.example.chemical.ChemicalApp;
+import com.example.chemical.databinding.ActivityUnlockBinding;
+import com.example.chemical.ui.common.BaseCountDownActivity;
+import com.example.chemical.ui.plan.room.RoomTool;
+import com.example.chemical.ui.plan.room.bean.input_add.InventoryItemBean;
+import com.example.chemical.ui.plan.room.bean.locker.HxpCabinetDoorVo;
+import com.example.chemical.ui.plan.room.bean.locker.HxpCabinetVo;
+import com.example.chemical.ui.plan.room.dao.HxpCabinetDAO;
+import com.example.chemical.ui.plan.room.dao.HxpDoorDAO;
+import com.example.chemical.ui.plan.room.dao.HxpInventoryDAO;
+import com.example.chemical.ui.verify.DoubleVerifyActivity;
+import com.example.chemical.ui.verify.TwoVerificationActivity;
+import com.example.chemical.utils.UiManager;
+import com.rc.httpcore.bean.HxpChemicalVo;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public class UnlockActivity extends BaseCountDownActivity<ActivityUnlockBinding> {
+    private ActivityUnlockBinding binding;
+
+    /**
+     * 是否管控
+     */
+    private boolean isControl = false;
+
+    @NonNull
+    @Override
+    protected ActivityUnlockBinding createViewBinding() {
+        return binding = ActivityUnlockBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected void initViews(@Nullable Bundle savedInstanceState) {
+        super.initViews(savedInstanceState);
+
+        HxpCabinetDAO hxpCabinetDAO = RoomTool.getInstance().hxpCabinetDAO();
+        HxpDoorDAO hxpDoorDAO = RoomTool.getInstance().hxpDoorDAO();
+        HxpInventoryDAO hxpInventoryDAO = RoomTool.getInstance().hxpInventoryDAO();
+
+        List<InventoryItemBean> inventoryItemBeanList = hxpInventoryDAO.getAll();
+        for (int i = 0; i < inventoryItemBeanList.size(); i++) {
+            InventoryItemBean inventoryItemBean = inventoryItemBeanList.get(i);
+            HxpChemicalVo hxpChemicalVo = inventoryItemBean.getHxpChemicalVo();
+            if (1 == hxpChemicalVo.getChemicalLevel()) {
+                isControl = true;
+                break;
+            }
+        }
+
+
+        // 柜门信息理应需要从柜门表中遍历塞到柜子中  观察数据是否异常
+        List<HxpCabinetVo> cabinetList = hxpCabinetDAO.getAll();
+        List<HxpCabinetDoorVo> doorList = hxpDoorDAO.getAll();
+
+        binding.cabinetTV.setText(cabinetList.size() + "个");
+        binding.doorTV.setText(doorList.size() + "个");
+        binding.unlockGV.setAdapter(new UnlockAdapter(this, cabinetList, doorList));
+
+        binding.cancelBT.setOnClickListener(v -> finish());
+
+        binding.validateBT.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                ActivityUtils.startActivity(DoubleVerifyActivity.class);
+//                /* 以下前同事代码*/
+//                String verifyType = ChemicalApp.confs.getVerifyType();
+//                Map<String, Object> map = new HashMap<>();
+//                map.put("chemicalLevel", isControl ? 1 : 2);
+//                map.put("mTag", 0);
+//                if (verifyType.length() == 1) {
+////                    map.put("dooId",)
+//                    map.put("mVerTyps", Integer.valueOf(verifyType));
+//                    UiManager.INSTANCE.switcher(UnlockActivity.this, map, TwoVerificationActivity.class);
+//                } else {
+//                    map.put("mVerTyps", 0);
+//                }
+            }
+        });
+    }
+}

+ 108 - 0
app/src/main/java/com/example/chemical/ui/plan/unlock/UnlockAdapter.java

@@ -0,0 +1,108 @@
+package com.example.chemical.ui.plan.unlock;
+
+import android.content.Context;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+
+import com.blankj.utilcode.util.LogUtils;
+import com.example.chemical.R;
+import com.example.chemical.databinding.ItemDoorUnlockBinding;
+import com.example.chemical.ui.plan.room.RoomTool;
+import com.example.chemical.ui.plan.room.bean.locker.HxpCabinetDoorVo;
+import com.example.chemical.ui.plan.room.bean.locker.HxpCabinetVo;
+import com.example.chemical.ui.plan.room.dao.HxpDoorDAO;
+
+import java.util.List;
+
+public class UnlockAdapter extends BaseAdapter {
+    List<HxpCabinetVo> cabinetList;
+    List<HxpCabinetDoorVo> doorList;
+    private Context context;
+    private HxpDoorDAO doorDAO;
+
+    public UnlockAdapter(Context context, List<HxpCabinetVo> cabinetList, List<HxpCabinetDoorVo> doorList) {
+        this.cabinetList = cabinetList;
+        this.doorList = doorList;
+        this.context = context;
+        doorDAO = RoomTool.getInstance().hxpDoorDAO();
+    }
+
+    @Override
+    public int getCount() {
+        return null == cabinetList ? 0 : cabinetList.size();
+    }
+
+    @Override
+    public HxpCabinetVo getItem(int position) {
+        return null == cabinetList ? null : cabinetList.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return 0;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        ViewHolder viewHolder;
+        if (convertView == null) {
+            ItemDoorUnlockBinding binding = ItemDoorUnlockBinding.inflate(LayoutInflater.from(context), parent, false);
+            convertView = binding.getRoot();
+            viewHolder = new ViewHolder(binding);
+            convertView.setTag(viewHolder);
+            // 上门
+            binding.upDoorUnlockBT.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+
+                }
+            });
+            // 下门
+            binding.downDoorUnlockBT.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+
+                }
+            });
+        } else {
+            viewHolder = (ViewHolder) convertView.getTag();
+        }
+
+        HxpCabinetVo cabinet = getItem(position);
+        if (null != cabinet) {
+            try {
+                String cabinetName = cabinet.getCabinetName();
+                viewHolder.binding.cabinetNameTV.setText(TextUtils.isEmpty(cabinetName) ? "" : cabinetName);
+
+                List<HxpCabinetDoorVo> hxpCabinetDoorVoList = doorDAO.getByCabinetId(cabinet.getCabinetId());
+                int doorNum = cabinet.getDoorNum();
+                HxpCabinetDoorVo upDoor = hxpCabinetDoorVoList.get(0);
+                String doorName = upDoor.getDoorName();
+                viewHolder.binding.upDoorNameTV.setText(TextUtils.isEmpty(doorName) ? "" : doorName);
+                if (doorNum > 1) {
+                    HxpCabinetDoorVo downDoor = hxpCabinetDoorVoList.get(1);
+                    String downDoorName = downDoor.getDoorName();
+                    viewHolder.binding.downDoorNameTV.setText(TextUtils.isEmpty(downDoorName) ? "" : downDoorName);
+                    viewHolder.binding.downDoorNameTV.setVisibility(View.VISIBLE);
+                    viewHolder.binding.cabinetLL.setBackgroundResource(R.mipmap.img_skm);
+                }
+            } catch (Exception e) {
+                LogUtils.e(Log.getStackTraceString(e));
+            }
+        }
+
+        return convertView;
+    }
+
+    static class ViewHolder {
+        ItemDoorUnlockBinding binding;
+
+        public ViewHolder(ItemDoorUnlockBinding binding) {
+            this.binding = binding;
+        }
+    }
+}

+ 139 - 0
app/src/main/java/com/example/chemical/ui/verify/DoubleVerifyActivity.java

@@ -0,0 +1,139 @@
+package com.example.chemical.ui.verify;
+
+import android.graphics.Bitmap;
+import android.os.Bundle;
+import android.view.View;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.FragmentManager;
+
+import com.blankj.utilcode.util.FragmentUtils;
+import com.blankj.utilcode.util.ImageUtils;
+import com.blankj.utilcode.util.LogUtils;
+import com.blankj.utilcode.util.ToastUtils;
+import com.example.chemical.databinding.ActivityDoubleVerifyBinding;
+import com.example.chemical.ui.common.BaseCountDownActivity;
+import com.example.chemical.ui.verify.fragment.DetectType;
+import com.example.chemical.ui.verify.fragment.FaceDetectFragment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DoubleVerifyActivity extends BaseCountDownActivity<ActivityDoubleVerifyBinding> {
+    private ActivityDoubleVerifyBinding binding;
+    private FragmentManager fragmentManager;
+
+    private final List<Boolean> doubleVerifyList = new ArrayList<Boolean>() {{
+        add(false);
+        add(false);
+    }};
+
+    @NonNull
+    @Override
+    protected ActivityDoubleVerifyBinding createViewBinding() {
+        return binding = ActivityDoubleVerifyBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected void initViews(@Nullable Bundle savedInstanceState) {
+        super.initViews(savedInstanceState);
+    }
+
+    @Override
+    protected void initData() {
+        super.initData();
+        fragmentManager = getSupportFragmentManager();
+        FragmentUtils.add(fragmentManager, FaceDetectFragment.getInstance(), binding.fragment1FL.getId());
+        binding.card1TV.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+            }
+        });
+        binding.face1TV.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                verify1(DetectType.FACE_DETECT);
+            }
+        });
+        binding.scan1TV.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+            }
+        });
+        binding.card2TV.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+            }
+        });
+        binding.face2TV.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                verify2(DetectType.FACE_DETECT);
+            }
+        });
+
+        binding.scan2TV.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                FaceDetectFragment.getInstance().startFaceDetect();
+            }
+        });
+
+//        FaceDetectFragment.getInstance().setActivityListener(new DoubleVerifyListener() {
+//            @Override
+//            public void detect(DetectType type, Bitmap faceBitmap, boolean isVerified) {
+//                LogUtils.d(type, isVerified);
+//                switch (type) {
+//                    case FACE_DETECT:
+//                        if (isVerified) {
+//                            // 是否第一个已经验证通过
+//                            if (doubleVerifyList.get(0)) {
+//                                ToastUtils.showLong("双人认证成功");
+//                                FaceDetectFragment.getInstance().stopFaceDetect();
+//                                FragmentUtils.removeAll(fragmentManager);
+//                                binding.fragment2FL.setBackground(ImageUtils.bitmap2Drawable(faceBitmap));
+//                            } else {
+//                                ToastUtils.showLong("第一个人认证成功");
+//                                doubleVerifyList.set(0, true);
+//                                verify2(type);
+//                                binding.fragment1FL.setBackground(ImageUtils.bitmap2Drawable(faceBitmap));
+//                            }
+//                        }
+//                        break;
+//                    case SCAN_DETECT:
+//                        break;
+//                    case CARD_DETECT:
+//                        break;
+//                }
+//            }
+//        });
+    }
+
+    private void verify1(DetectType faceDetect) {
+        switch (faceDetect) {
+            case FACE_DETECT:
+                FaceDetectFragment.getInstance().stopFaceDetect();
+                FragmentUtils.removeAll(fragmentManager);
+                FragmentUtils.add(fragmentManager, FaceDetectFragment.getInstance(), binding.fragment1FL.getId());
+                FaceDetectFragment.getInstance().startFaceDetect();
+                break;
+        }
+    }
+
+    private void verify2(DetectType faceDetect) {
+        switch (faceDetect) {
+            case FACE_DETECT:
+                FaceDetectFragment.getInstance().stopFaceDetect();
+                FragmentUtils.removeAll(fragmentManager);
+                FragmentUtils.add(fragmentManager, FaceDetectFragment.getInstance(), binding.fragment2FL.getId());
+                FaceDetectFragment.getInstance().startFaceDetect();
+                break;
+        }
+    }
+
+    public interface DoubleVerifyListener {
+        void detect(DetectType type, Bitmap faceBitmap, boolean isVerified);
+    }
+}

+ 5 - 0
app/src/main/java/com/example/chemical/ui/verify/OnDataToFragmentListener.java

@@ -0,0 +1,5 @@
+package com.example.chemical.ui.verify;
+
+public interface OnDataToFragmentListener {
+    void onDataToFragment(String data);
+}

+ 7 - 0
app/src/main/java/com/example/chemical/ui/verify/fragment/DetectType.java

@@ -0,0 +1,7 @@
+package com.example.chemical.ui.verify.fragment;
+
+public enum DetectType {
+    FACE_DETECT,
+    SCAN_DETECT,
+    CARD_DETECT
+}

+ 0 - 7
app/src/main/java/com/example/chemical/ui/verify/fragment/FaceDetectFragment.java

@@ -1,9 +1,6 @@
 package com.example.chemical.ui.verify.fragment;
 
 import android.annotation.SuppressLint;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Matrix;
 import android.os.Bundle;
 import android.util.Log;
 import android.util.Size;
@@ -15,8 +12,6 @@ import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.camera.core.CameraSelector;
 import androidx.camera.core.ImageAnalysis;
-import androidx.camera.core.ImageCapture;
-import androidx.camera.core.ImageCaptureException;
 import androidx.camera.core.ImageProxy;
 import androidx.camera.core.Preview;
 import androidx.camera.lifecycle.ProcessCameraProvider;
@@ -35,8 +30,6 @@ import com.google.mlkit.vision.face.FaceDetection;
 import com.google.mlkit.vision.face.FaceDetector;
 import com.google.mlkit.vision.face.FaceDetectorOptions;
 
-import java.io.File;
-import java.nio.ByteBuffer;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;

+ 12 - 0
app/src/main/res/drawable/shap_rectangle_dash.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <stroke
+        android:width="1px"
+        android:color="#A2A2A2"
+        android:dashWidth="6px"
+        android:dashGap="6px" />
+    <corners android:radius="10px" />
+    <solid android:color="@android:color/transparent" />
+
+</shape>

+ 8 - 0
app/src/main/res/drawable/shape_unlock_failed.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval">
+    <solid android:color="#FF2E2E" />
+    <size
+        android:width="25px"
+        android:height="25px" />
+</shape>

+ 8 - 0
app/src/main/res/drawable/shape_unlock_success.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval">
+    <solid android:color="#0FB525" />
+    <size
+        android:width="25px"
+        android:height="25px" />
+</shape>

+ 330 - 0
app/src/main/res/layout/activity_double_verify.xml

@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/main"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@mipmap/icon_bgm"
+    tools:context=".ui.verify.DoubleVerifyActivity">
+
+    <RelativeLayout
+        android:id="@+id/title_RL"
+        android:layout_width="match_parent"
+        android:layout_height="45dp"
+        android:layout_marginTop="10dp">
+
+        <ImageView
+            android:id="@+id/image"
+            android:layout_width="30dp"
+            android:layout_height="30dp"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="20dp" />
+
+        <TextView
+            android:id="@+id/deptName"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="10dp"
+            android:layout_toRightOf="@+id/image"
+            android:text="实验室名称-房间号"
+            android:textColor="@color/white"
+            android:textSize="22sp" />
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"
+            android:layout_centerVertical="true"
+            android:layout_marginTop="2dp">
+
+            <TextView
+                android:id="@+id/tvTitle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerHorizontal="true"
+                android:layout_centerVertical="true"
+                android:text="化学品智能管理"
+                android:textColor="@color/white"
+                android:textSize="24sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/nowTime"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="6dp"
+                android:layout_toRightOf="@+id/tvTitle"
+                android:textColor="@color/white" />
+
+        </LinearLayout>
+
+
+        <RelativeLayout
+            android:id="@+id/loggedIn"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:layout_marginRight="18dp"
+            android:gravity="center_vertical"
+            android:visibility="gone">
+
+            <ImageView
+                android:id="@+id/imageName"
+                android:layout_width="30dp"
+                android:layout_height="30dp"
+                android:layout_centerVertical="true"
+                android:layout_marginRight="6dp" />
+
+            <TextView
+                android:id="@+id/tvName"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="6dp"
+                android:layout_marginRight="6dp"
+                android:layout_toRightOf="@+id/imageName"
+                android:text="李XX"
+                android:textColor="@color/white" />
+
+            <ImageView
+                android:id="@+id/imgOut"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="6dp"
+                android:layout_marginRight="6dp"
+                android:layout_toRightOf="@+id/tvName"
+                android:background="@mipmap/cshrk_dl_tc" />
+
+            <TextView
+                android:id="@+id/tvOutLogin"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginRight="10dp"
+                android:layout_toRightOf="@+id/imgOut"
+                android:text="退出"
+                android:textColor="@color/white"
+                android:textSize="16sp" />
+        </RelativeLayout>
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@id/title_RL"
+        android:layout_marginHorizontal="30dp"
+        android:layout_marginTop="15dp"
+        android:layout_marginBottom="79dp"
+        android:background="@drawable/bg_bei_jing"
+        android:orientation="vertical">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:layout_marginVertical="10dp"
+            android:text="双 人 认 证"
+            android:textColor="@color/white"
+            android:textSize="16sp"
+            android:textStyle="bold" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="horizontal">
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_gravity="center_horizontal"
+                android:layout_marginHorizontal="15px"
+                android:layout_weight="1">
+
+                <TextView
+                    android:id="@+id/hint_1_IV"
+                    android:layout_width="match_parent"
+                    android:layout_height="45dp"
+                    android:background="@drawable/bg_ren_lian"
+                    android:drawablePadding="10dp"
+                    android:gravity="center_vertical"
+                    android:paddingStart="10dp"
+                    android:text="请第一位人脸验证"
+                    android:textColor="@color/white"
+                    android:textSize="18sp"
+                    app:drawableStartCompat="@mipmap/icon_smrz_sfrz"
+                    tools:ignore="RtlSymmetry" />
+
+                <RelativeLayout
+                    android:id="@+id/control_1_RL"
+                    android:layout_width="match_parent"
+                    android:layout_height="50dp"
+                    android:layout_alignParentBottom="true"
+                    android:layout_marginVertical="5dp"
+                    android:background="@mipmap/icon_rlrz_xx">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerVertical="true"
+                        android:drawablePadding="10dp"
+                        android:text="请正对屏幕并使脸位于取景框内\n请保持光线充足,避免光照过强或过弱"
+                        android:textColor="@color/black"
+                        android:textSize="12sp"
+                        app:drawableStartCompat="@mipmap/icon_sfsb_tx" />
+
+
+                    <LinearLayout
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_alignParentEnd="true"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/scan_1_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:background="@mipmap/icon_sfsb_wxsm" />
+
+                        <TextView
+                            android:id="@+id/card_1_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:background="@mipmap/icon_sfsb_xyk" />
+
+                        <TextView
+                            android:id="@+id/face_1_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:background="@mipmap/icon_sfsb_rlsb"
+                            android:visibility="gone" />
+
+                    </LinearLayout>
+                </RelativeLayout>
+
+                <RelativeLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_above="@id/control_1_RL"
+                    android:layout_below="@id/hint_1_IV"
+                    android:background="@drawable/bg_face_nt">
+
+                    <FrameLayout
+                        android:id="@+id/fragment_1_FL"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:background="@mipmap/icon_face_two">
+
+                    </FrameLayout>
+                </RelativeLayout>
+
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_gravity="center_horizontal"
+                android:layout_marginHorizontal="15px"
+                android:layout_weight="1">
+
+                <TextView
+                    android:id="@+id/hint_2_IV"
+                    android:layout_width="match_parent"
+                    android:layout_height="45dp"
+                    android:background="@drawable/bg_ren_lian"
+                    android:drawablePadding="10dp"
+                    android:gravity="center_vertical"
+                    android:paddingStart="10dp"
+                    android:text="请第二位人脸验证"
+                    android:textColor="@color/white"
+                    android:textSize="18sp"
+                    app:drawableStartCompat="@mipmap/icon_smrz_sfrz"
+                    tools:ignore="RtlSymmetry" />
+
+                <RelativeLayout
+                    android:id="@+id/control_2_RL"
+                    android:layout_width="match_parent"
+                    android:layout_height="50dp"
+                    android:layout_alignParentBottom="true"
+                    android:layout_marginVertical="5dp"
+                    android:background="@mipmap/icon_rlrz_xx">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerVertical="true"
+                        android:drawablePadding="10dp"
+                        android:text="请正对屏幕并使脸位于取景框内\n请保持光线充足,避免光照过强或过弱"
+                        android:textColor="@color/black"
+                        android:textSize="12sp"
+                        app:drawableStartCompat="@mipmap/icon_sfsb_tx" />
+
+
+                    <LinearLayout
+                        android:layout_width="200dp"
+                        android:layout_height="wrap_content"
+                        android:layout_alignParentEnd="true"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/scan_2_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:background="@mipmap/icon_sfsb_wxsm" />
+
+                        <TextView
+                            android:id="@+id/card_2_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:background="@mipmap/icon_sfsb_xyk" />
+
+                        <TextView
+                            android:id="@+id/face_2_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:background="@mipmap/icon_sfsb_rlsb"
+                            android:visibility="gone" />
+
+                    </LinearLayout>
+                </RelativeLayout>
+
+                <RelativeLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_above="@id/control_2_RL"
+                    android:layout_below="@id/hint_2_IV"
+                    android:background="@drawable/bg_face_nt">
+
+                    <FrameLayout
+                        android:id="@+id/fragment_2_FL"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:background="@mipmap/icon_face_two">
+
+                    </FrameLayout>
+                </RelativeLayout>
+            </RelativeLayout>
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <Button
+        android:id="@+id/tvReturn"
+        android:layout_width="85dp"
+        android:layout_height="30dp"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="20dp"
+        android:background="@drawable/bg_retrun"
+        android:text="返回180s"
+        android:textColor="@color/white"
+        android:textSize="12sp" />
+</RelativeLayout>

+ 360 - 0
app/src/main/res/layout/activity_unlock.xml

@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:animateLayoutChanges="true"
+    android:background="@mipmap/icon_add_bg"
+    android:orientation="vertical"
+    tools:ignore="PxUsage">
+
+
+    <RelativeLayout
+        android:id="@+id/rel1"
+        android:layout_width="match_parent"
+        android:layout_height="45dp"
+        android:layout_marginTop="10dp">
+
+        <ImageView
+            android:id="@+id/image"
+            android:layout_width="30dp"
+            android:layout_height="30dp"
+            android:layout_centerVertical="true"
+            android:layout_marginStart="20dp" />
+
+        <TextView
+            android:id="@+id/deptName"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_marginStart="10dp"
+            android:layout_toEndOf="@+id/image"
+            android:text="实验室名称-房间号"
+            android:textColor="@color/white"
+            android:textSize="22sp" />
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"
+            android:layout_centerVertical="true"
+            android:layout_marginTop="2dp">
+
+            <TextView
+                android:id="@+id/tvTitle"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="化学品智能管理"
+                android:textColor="@color/white"
+                android:textSize="24sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/nowTime"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="6dp"
+                android:textColor="@color/white" />
+
+        </LinearLayout>
+
+
+        <RelativeLayout
+            android:id="@+id/loggedIn"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentEnd="true"
+            android:layout_centerVertical="true"
+            android:gravity="center_vertical"
+            android:paddingEnd="18dp">
+
+            <ImageView
+                android:id="@+id/imageName"
+                android:layout_width="30dp"
+                android:layout_height="30dp"
+                android:layout_centerVertical="true"
+                android:layout_marginEnd="6dp" />
+
+            <TextView
+                android:id="@+id/tvName"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="6dp"
+                android:layout_marginRight="6dp"
+                android:layout_toEndOf="@+id/imageName"
+                android:text="李XX"
+                android:textColor="@color/white" />
+
+            <ImageView
+                android:id="@+id/imgOut"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="6dp"
+                android:layout_marginRight="6dp"
+                android:layout_toEndOf="@+id/tvName"
+                android:background="@mipmap/cshrk_dl_tc" />
+
+            <TextView
+                android:id="@+id/tvOutLogin"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginEnd="10dp"
+                android:layout_toEndOf="@+id/imgOut"
+                android:text="退出"
+                android:textColor="@color/white"
+                android:textSize="16sp" />
+        </RelativeLayout>
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/rel1"
+        android:layout_marginLeft="31dp"
+        android:layout_marginTop="15dp"
+        android:layout_marginRight="31dp"
+        android:layout_marginBottom="69dp"
+        android:background="@drawable/bg_add_chemicals_one">
+
+        <LinearLayout
+            android:id="@+id/control_LL"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_centerHorizontal="true"
+            android:layout_marginVertical="10px"
+            android:orientation="horizontal">
+
+            <Button
+                android:id="@+id/cancel_BT"
+                android:layout_width="250px"
+                android:layout_height="70px"
+                android:layout_marginHorizontal="35px"
+                android:background="@drawable/selector_input_select_bt"
+                android:text="关闭"
+                android:textColor="@color/white" />
+
+            <Button
+                android:id="@+id/validate_BT"
+                android:layout_width="250px"
+                android:layout_height="70px"
+                android:layout_marginHorizontal="35px"
+                android:background="@drawable/selector_input_select_bt"
+                android:text="认证开门"
+                android:textColor="@color/white" />
+
+            <Button
+                android:layout_width="250px"
+                android:layout_height="70px"
+                android:layout_marginHorizontal="35px"
+                android:background="@drawable/selector_input_select_bt"
+                android:text="完成存储"
+                android:textColor="@color/white"
+                android:visibility="gone" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_above="@id/control_LL"
+            android:layout_marginTop="10px"
+            android:orientation="horizontal">
+
+            <LinearLayout
+                android:layout_width="400px"
+                android:layout_height="match_parent"
+                android:orientation="vertical">
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:layout_width="340px"
+                        android:layout_height="80px"
+                        android:background="#2697FF"
+                        android:gravity="center"
+                        android:text="同时打开多个柜门\n请联系以下任意人员协助开门"
+                        android:textColor="@color/white"
+                        android:textSize="22px" />
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="100px"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="120px"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center_vertical"
+                            android:layout_marginHorizontal="10px"
+                            android:text="柜门管理员"
+                            android:textSize="20px" />
+
+                        <TextView
+                            android:id="@+id/admin_TV"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:textSize="18px" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="100px"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="120px"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center_vertical"
+                            android:layout_marginHorizontal="10px"
+                            android:text="实验室安全员"
+                            android:textSize="20px" />
+
+                        <TextView
+                            android:id="@+id/safety_TV"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:textSize="18px" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="100px"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="120px"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center_vertical"
+                            android:layout_marginHorizontal="10px"
+                            android:text="实验室负责人"
+                            android:textSize="20px" />
+
+                        <TextView
+                            android:id="@+id/director_TV"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:textSize="18px" />
+                    </LinearLayout>
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="horizontal">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:orientation="vertical">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="end"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="柜子" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="end"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="柜门" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="end"
+                            android:layout_weight="1"
+                            android:drawableStart="@drawable/shape_unlock_success"
+                            android:drawablePadding="15px"
+                            android:gravity="center"
+                            android:text="成功" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="end"
+                            android:layout_weight="1"
+                            android:drawableStart="@drawable/shape_unlock_failed"
+                            android:drawablePadding="15px"
+                            android:gravity="center"
+                            android:text="失败" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:orientation="vertical">
+
+                        <TextView
+                            android:id="@+id/cabinet_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_weight="1"
+                            android:gravity="center" />
+
+                        <TextView
+                            android:id="@+id/door_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_weight="1"
+                            android:gravity="center" />
+
+                        <TextView
+                            android:id="@+id/unlocked_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:textColor="#0FB525" />
+
+                        <TextView
+                            android:id="@+id/unlock_failed_TV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:textColor="#FF2E2E" />
+                    </LinearLayout>
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="1px"
+                android:layout_height="match_parent"
+                android:layout_marginBottom="20px"
+                android:background="#a2a2a2" />
+
+            <GridView
+                android:id="@+id/unlock_GV"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_margin="5px"
+                android:numColumns="3"
+                tools:listitem="@layout/item_door_unlock" />
+        </LinearLayout>
+
+    </RelativeLayout>
+
+</RelativeLayout>

+ 27 - 0
app/src/main/res/layout/fragment_face_detect.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <androidx.camera.view.PreviewView
+        android:id="@+id/previewView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+
+    <TextView
+        android:id="@+id/hint_TV"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_centerHorizontal="true"
+        android:layout_marginBottom="50px"
+        android:drawablePadding="10px"
+        android:gravity="center"
+        android:text="请确保相机区域内只有一个人脸"
+        android:textColor="#FEF011"
+        android:textSize="36px"
+        android:visibility="gone"
+        tools:ignore="PxUsage" />
+</RelativeLayout>

+ 130 - 0
app/src/main/res/layout/item_door_unlock.xml

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout
+        android:layout_width="420px"
+        android:layout_height="220px"
+        android:orientation="horizontal">
+
+        <RelativeLayout
+            android:id="@+id/cabinet_LL"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_marginStart="10px"
+            android:background="@mipmap/img_dkm">
+
+        </RelativeLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+
+            <TextView
+                android:id="@+id/cabinet_name_TV"
+                android:layout_width="match_parent"
+                android:layout_height="50px"
+                android:layout_marginStart="5px"
+                android:gravity="center_vertical"
+                android:text="柜子名称" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginStart="10px"
+                android:layout_marginBottom="5px"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="150px"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical">
+
+
+                    <TextView
+                        android:id="@+id/up_door_name_TV"
+                        android:layout_width="150px"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:gravity="center_vertical"
+                        android:maxLines="2"
+                        android:text="名称"
+                        android:textSize="28px" />
+
+                    <TextView
+                        android:id="@+id/down_door_name_TV"
+                        android:layout_width="150px"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:gravity="center_vertical"
+                        android:maxLines="2"
+                        android:text="名称"
+                        android:textSize="28px"
+                        android:visibility="gone" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:id="@+id/lock_LL"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ProgressBar
+                        android:id="@+id/unlocking_PB"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_centerInParent="true"
+                        android:visibility="gone" />
+
+                    <LinearLayout
+                        android:id="@+id/up_door_unlock_LL"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:visibility="gone">
+
+                        <Button
+                            android:id="@+id/up_door_unlock_BT"
+                            android:layout_width="100px"
+                            android:layout_height="45px"
+                            android:layout_gravity="end|center_vertical"
+                            android:layout_margin="5px"
+                            android:layout_weight="1"
+                            android:background="@drawable/selector_input_bt"
+                            android:gravity="center"
+                            android:text="开门"
+                            android:textColor="@color/white"
+                            android:textSize="20px" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:id="@+id/down_door_unlock_LL"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:visibility="gone">
+
+                        <Button
+                            android:id="@+id/down_door_unlock_BT"
+                            android:layout_width="100px"
+                            android:layout_height="45px"
+                            android:layout_gravity="end|center_vertical"
+                            android:layout_margin="5px"
+                            android:layout_weight="1"
+                            android:background="@drawable/selector_input_bt"
+                            android:gravity="center"
+                            android:text="开门"
+                            android:textColor="@color/white"
+                            android:textSize="20px" />
+                    </LinearLayout>
+                </LinearLayout>
+            </LinearLayout>
+        </LinearLayout>
+    </LinearLayout>
+</RelativeLayout>

BIN
app/src/main/res/mipmap-xhdpi/icon_sy_cwts.png


BIN
app/src/main/res/mipmap-xhdpi/icon_sy_ts.png


BIN
app/src/main/res/mipmap-xhdpi/img_dkm.png


BIN
app/src/main/res/mipmap-xhdpi/img_skm.png