This commit is contained in:
zxj
2025-07-29 11:09:59 +08:00
parent df5acf6b61
commit 56e0a85a4c
106 changed files with 10986 additions and 92 deletions
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextureView
android:id="@+id/textureView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<Button
android:id="@+id/switchButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="切换摄像头"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000">
<!-- CameraX 预览视图 -->
<androidx.camera.view.PreviewView
android:id="@+id/previewView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter" />
<!-- 半透明遮罩层 -->
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#80000000" />
<!-- 自定义采集框 -->
<com.sw.dualscreen.view.CameraCaptureView
android:id="@+id/cameraCaptureView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<!-- 底部操作栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="horizontal"
android:padding="16dp">
<Button
android:id="@+id/btnCancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="取消"
android:textColor="#FFF" />
<Space
android:layout_width="16dp"
android:layout_height="1dp" />
<Button
android:id="@+id/btnCapture"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="拍照"
android:textColor="#FFF" />
</LinearLayout>
</FrameLayout>
+54 -3
View File
@@ -1,10 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
android:background="@mipmap/bg"
android:gravity="center_horizontal"
android:orientation="vertical"
tools:context=".activity.MainActivity">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="80dp"
android:layout_marginTop="40dp">
</androidx.constraintlayout.widget.ConstraintLayout>
<Spinner
android:layout_width="wrap_content"
android:layout_height="80dp"
android:layout_gravity="end|center_vertical" />
</FrameLayout>
<TextView
style="@style/text_title_60_blob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="羊肉臊子荞面饸饹" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="630dp"
android:layout_marginStart="120dp"
android:layout_marginTop="60dp"
android:layout_marginEnd="120dp"
android:layout_marginBottom="60dp"
android:visibility="visible">
<androidx.camera.view.PreviewView
android:id="@+id/previewView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="30dp"
android:background="@drawable/preview_border" />
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
style="@style/text_100"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="先识别 后取餐1" />
</LinearLayout>
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/bg"
android:gravity="center_horizontal"
android:orientation="vertical"
tools:context=".activity.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginStart="120dp"
android:layout_marginTop="120dp"
android:layout_marginEnd="120dp"
android:background="@drawable/rounded_border_transparent"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<TextView
android:id="@+id/tv_goods"
style="@style/text_title_60_blob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="羊肉臊子荞面饸饹" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="560dp"
android:layout_marginTop="60dp"
android:visibility="visible">
<FrameLayout
android:layout_width="560dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="1dp">
<TextureView
android:id="@+id/dual_camera_texture_preview_rgb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible" />
<com.sw.plate.utils.arcface.FaceRectView
android:id="@+id/dual_camera_face_rect_view"
android:layout_width="match_parent"
android:layout_height="380dp" />
</FrameLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/bg_face" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="730dp"
android:layout_marginStart="120dp"
android:layout_marginEnd="120dp"
android:layout_marginBottom="120dp"
android:background="@drawable/rounded_border_transparent"
android:gravity="center">
<TextView
style="@style/text_100"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="先识别 后取餐" />
</LinearLayout>
</LinearLayout>