添加了副屏显示逻辑控制
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
@@ -21,21 +20,22 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:padding="28dp"
|
||||
android:background="@drawable/bg_detection_selector">
|
||||
|
||||
<com.sw.dualscreen.view.CustomSpinner
|
||||
<Spinner
|
||||
android:id="@+id/spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:spinnerTextColor="#ffece7d0"
|
||||
app:spinnerTextSize="26sp" />
|
||||
style="@style/customSpinnerStyle"
|
||||
android:layout_gravity="end"
|
||||
android:padding="0dp"
|
||||
android:popupBackground="@drawable/shape_for_custom_spinner" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods"
|
||||
android:id="@+id/tv_food_name"
|
||||
style="@style/text_title_blob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -46,7 +46,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="531dp"
|
||||
android:layout_marginHorizontal="60dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:layout_marginTop="110dp"
|
||||
android:layout_marginBottom="90dp"
|
||||
android:visibility="visible">
|
||||
|
||||
@@ -55,6 +55,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="食物图预览"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:background="@drawable/grid_item_checked"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="42dp">
|
||||
android:paddingVertical="40dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
@@ -16,7 +16,6 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#ff031127"
|
||||
android:textSize="36sp"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="36sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="40dp"
|
||||
android:paddingVertical="24dp"
|
||||
android:singleLine="true"
|
||||
android:text="下拉列表项样式"
|
||||
android:textColor="#ECE7D0"
|
||||
android:textSize="26dp" />
|
||||
@@ -6,7 +6,7 @@
|
||||
android:background="@drawable/grid_search_item_checked"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="42dp">
|
||||
android:paddingVertical="35dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
@@ -16,7 +16,6 @@
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FF9900"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="30sp" />
|
||||
|
||||
</LinearLayout>
|
||||
+12
-10
@@ -1,26 +1,28 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cl_nutritionData"
|
||||
android:layout_width="540dp"
|
||||
android:layout_height="487dp"
|
||||
android:background="@drawable/rounded_border_transparent"
|
||||
android:visibility="visible"
|
||||
android:padding="28dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="夏*秋"
|
||||
tools:text="夏*秋"
|
||||
android:textColor="#ffece7d0"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_heat"
|
||||
android:id="@+id/tv_recommend_heat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="推荐热量:680kcal"
|
||||
tools:text="推荐热量:680kcal"
|
||||
android:textColor="#ffece7d0"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -87,9 +89,9 @@
|
||||
<com.sw.dualscreen.view.CustomImageView
|
||||
android:id="@+id/iv_staple_food"
|
||||
android:layout_width="87dp"
|
||||
android:src="#99CC99"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:layout_height="100dp" />
|
||||
android:src="#99CC99" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -106,8 +108,8 @@
|
||||
<com.sw.dualscreen.view.CustomImageView
|
||||
android:id="@+id/iv_fruits_vegetables"
|
||||
android:layout_width="87dp"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom|center" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -124,8 +126,8 @@
|
||||
<com.sw.dualscreen.view.CustomImageView
|
||||
android:id="@+id/iv_meat_eggs"
|
||||
android:layout_width="87dp"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom|center" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout 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"
|
||||
@@ -9,11 +9,42 @@
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.MainActivity">
|
||||
|
||||
<LinearLayout
|
||||
<!--人脸识别-->
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_face"
|
||||
android:layout_width="376dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingTop="1dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextureView
|
||||
android:id="@+id/dual_camera_texture_preview_rgb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
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="match_parent" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_face_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_face"
|
||||
android:contentDescription="相机遮盖层"
|
||||
android:visibility="visible" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="80dp"
|
||||
android:paddingTop="80dp">
|
||||
android:orientation="vertical"
|
||||
android:padding="80dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -24,55 +55,19 @@
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods"
|
||||
android:id="@+id/tv_food_info"
|
||||
style="@style/text_title_blob_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="羊肉臊子荞面饸饹" />
|
||||
tools:text="羊肉臊子荞面饸饹" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="40dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_face"
|
||||
android:layout_width="376dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingTop="1dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextureView
|
||||
android:id="@+id/dual_camera_texture_preview_rgb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
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="match_parent" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_face_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_avatar"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_face_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="376dp"
|
||||
android:layout_marginTop="566dp"
|
||||
android:text="请正视屏幕"
|
||||
android:textColor="#ffece7d0"
|
||||
android:textSize="24sp"
|
||||
@@ -82,21 +77,21 @@
|
||||
android:id="@+id/fl_preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="420dp"
|
||||
android:visibility="visible"
|
||||
android:paddingHorizontal="80dp">
|
||||
android:layout_marginTop="174dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<androidx.camera.view.PreviewView
|
||||
android:id="@+id/previewView"
|
||||
android:visibility="gone"
|
||||
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"-->
|
||||
<!-- android:visibility="gone" />-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible"
|
||||
android:contentDescription="img" />
|
||||
android:contentDescription="img"
|
||||
android:visibility="visible" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -107,30 +102,22 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:paddingHorizontal="80dp"
|
||||
android:paddingBottom="80dp">
|
||||
android:layout_height="486dp"
|
||||
android:layout_marginTop="633dp"
|
||||
android:background="@drawable/rounded_border_transparent"
|
||||
android:gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="486dp"
|
||||
android:background="@drawable/rounded_border_transparent"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:id="@+id/tv_bottom_tip"
|
||||
style="@style/text_100_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="先识别 后取餐"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bottom_tip"
|
||||
style="@style/text_100_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="先识别 后取餐"
|
||||
android:visibility="gone" />
|
||||
|
||||
<include
|
||||
android:id="@+id/include_user_heat"
|
||||
layout="@layout/item_user_heat"
|
||||
android:visibility="visible" />
|
||||
</LinearLayout>
|
||||
<include
|
||||
android:id="@+id/include_user_nutrition"
|
||||
layout="@layout/item_user_nutrition" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user