init
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
@@ -1,4 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector>
|
||||
<?xml version="1.0" encoding="utf-8"?><!--<layer-list xmlns:android="http://schemas.android.com/apk/res/android">-->
|
||||
|
||||
</selector>
|
||||
<!-- 圆形背景(可选) -->
|
||||
<!-- <item>-->
|
||||
<!-- <shape android:shape="oval">-->
|
||||
<!-- <solid android:color="@android:color/transparent"/>-->
|
||||
<!-- </shape>-->
|
||||
<!-- </item>-->
|
||||
|
||||
<!-- 虚线边框 -->
|
||||
<!--<item>-->
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:inset="0dp">
|
||||
<shape android:shape="oval">
|
||||
<stroke
|
||||
android:width="4dp"
|
||||
android:color="#8C7D76"
|
||||
android:dashWidth="8dp"
|
||||
android:dashGap="4dp" />
|
||||
<solid android:color="@android:color/transparent" />
|
||||
</shape>
|
||||
</inset><!--</item>-->
|
||||
|
||||
<!--</layer-list>-->
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/transparent" />
|
||||
|
||||
<!-- 边框设置 -->
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/white" />
|
||||
|
||||
<!-- 圆角半径 -->
|
||||
<corners android:radius="0dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/transparent" />
|
||||
|
||||
<!-- 边框设置 -->
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="#19ECE7D0" />
|
||||
|
||||
<!-- 圆角半径 -->
|
||||
<corners android:radius="24dp" />
|
||||
</shape>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 MiB |
@@ -6,4 +6,8 @@
|
||||
<attr name="borderWidth" format="dimension" />
|
||||
<attr name="borderColor" format="color" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
|
||||
<declare-styleable name="RoundedPreviewView">
|
||||
<attr name="cornerRadius" format="dimension" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
|
||||
@@ -2,4 +2,9 @@
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="origin_FF9900">#FF9900</color>
|
||||
<color name="beige_ECE7D0">#ECE7D0</color>
|
||||
<color name="blue_6498DD">#6498DD</color>
|
||||
<color name="black_031127">#031127</color>
|
||||
</resources>
|
||||
@@ -1,3 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">DualScreen</string>
|
||||
<string name="app_name">档口双屏</string>
|
||||
<string name="specific_engine_init_failed">%s 初始化失败,错误码:%d\n错误码常量名:%s</string>
|
||||
<string name="permission_denied">权限被拒绝!</string>
|
||||
</resources>
|
||||
@@ -6,4 +6,22 @@
|
||||
</style>
|
||||
|
||||
<style name="Theme.DualScreen" parent="Base.Theme.DualScreen" />
|
||||
|
||||
<style name="text_title_60_blob">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:textColor">@color/beige_ECE7D0</item>
|
||||
<item name="android:textSize">60sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="singleLine">true</item>
|
||||
</style>
|
||||
|
||||
<style name="text_100">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:textColor">@color/origin_FF9900</item>
|
||||
<item name="android:textSize">100sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="singleLine">true</item>
|
||||
<item name="maxLines">1</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user