This commit is contained in:
2026-01-14 10:38:09 +08:00
parent e86db688e1
commit 50d12de534
10 changed files with 254 additions and 189 deletions
+38 -72
View File
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
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="#FFE7EFF8"
android:gravity="center_horizontal"
android:orientation="vertical"
tools:context=".activity.MainActivity">
tools:context=".activity.MainActivity"
tools:theme="@style/Theme.AppCompat.Light.DarkActionBar">
<FrameLayout
@@ -36,22 +37,6 @@
android:src="@drawable/ic_setting"
tools:ignore="ContentDescription" />
<!-- <LinearLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="end"-->
<!-- android:background="@drawable/bg_detection_selector">-->
<!-- <Spinner-->
<!-- android:id="@+id/spinner"-->
<!-- style="@style/customSpinnerStyle"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="end"-->
<!-- android:padding="0dp"-->
<!-- android:popupBackground="@drawable/shape_for_custom_spinner" />-->
<!-- </LinearLayout>-->
</FrameLayout>
<TextView
@@ -59,10 +44,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:textStyle="bold"
android:textSize="52sp"
android:text="羊肉臊子荞面饸饹"
android:textColor="#FF0A1428"
android:text="羊肉臊子荞面饸饹" />
android:textSize="52sp"
android:textStyle="bold" />
<FrameLayout
android:id="@+id/foodDisplayLayout"
@@ -83,76 +68,57 @@
android:layout_height="match_parent"
android:contentDescription="食物图预览"
android:scaleType="centerCrop"
app:shapeAppearance="@style/round10dpCornerStyle"
android:visibility="gone" />
android:visibility="gone"
app:shapeAppearance="@style/round10dpCornerStyle" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="27dp"
android:background="@drawable/ic_camera_rect" />
<!-- preview_border-->
<!-- preview_border-->
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="0dp"
app:spanCount="2"
tools:itemCount="8"
android:overScrollMode="never"
tools:listitem="@layout/list_item_search_food"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
android:layout_marginHorizontal="14dp"
android:layout_marginTop="42dp"
android:layout_weight="1" />
<!-- <LinearLayout-->
<!-- android:id="@+id/layoutRescan"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginBottom="140dp"-->
<!-- android:gravity="center"-->
<!-- android:orientation="vertical"-->
<!-- android:visibility="gone">-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="未识别出菜品,请重试或手动搜索"-->
<!-- android:textColor="#FFFF3232"-->
<!-- android:textSize="24sp" />-->
<!-- <CheckedTextView-->
<!-- android:id="@+id/tv_rescan"-->
<!-- android:layout_width="360dp"-->
<!-- android:layout_height="90dp"-->
<!-- android:layout_marginTop="20dp"-->
<!-- android:background="@drawable/bg_search_food"-->
<!-- android:gravity="center"-->
<!-- android:padding="10dp"-->
<!-- android:text="重试"-->
<!-- android:paddingHorizontal="15dp"-->
<!-- android:textAlignment="center"-->
<!-- android:textColor="@color/color_search_food"-->
<!-- android:textStyle="bold"-->
<!-- android:checked="true"-->
<!-- android:textSize="32sp" />-->
<!-- </LinearLayout>-->
android:layout_weight="1"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2"
tools:itemCount="8"
tools:listitem="@layout/list_item_search_food" />
<TextView
android:id="@+id/tvToSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="38dp"
android:layout_marginBottom="54dp"
android:layout_marginBottom="0dp"
android:padding="10dp"
android:text="以上都不是,手动搜索"
android:textStyle="bold"
android:textColor="#FFFF3232"
android:textSize="31sp"
android:visibility="gone"/>
android:textStyle="bold"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="54dp"
android:gravity="center">
<TextView
android:id="@+id/tvWeightRealInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="12sp"
tools:text="以上都不是,手动搜索" />
</LinearLayout>
<FrameLayout
android:id="@+id/flPay"
android:layout_width="match_parent"
@@ -163,13 +129,13 @@
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btnPay"
android:layout_width="match_parent"
android:layout_margin="32dp"
android:layout_height="100dp"
android:textStyle="bold"
android:text="去结算"
android:textSize="40sp"
android:layout_margin="32dp"
android:background="@drawable/bg_btn_save"
android:textColor="@color/white"/>
android:text="去结算"
android:textColor="@color/white"
android:textSize="40sp"
android:textStyle="bold" />
</FrameLayout>