174 lines
6.5 KiB
XML
174 lines
6.5 KiB
XML
<?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"
|
|
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">
|
|
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="150dp">
|
|
|
|
<TextView
|
|
android:id="@+id/tvTitleTime"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginStart="28dp"
|
|
android:textColor="#ff0a1428"
|
|
android:textSize="26sp"
|
|
android:textStyle="bold"
|
|
tools:text="2025年11月11日 周二" />
|
|
|
|
<ImageView
|
|
android:id="@+id/ivSetting"
|
|
android:layout_width="58dp"
|
|
android:layout_height="58dp"
|
|
android:layout_gravity="end|center_vertical"
|
|
android:layout_marginEnd="18dp"
|
|
android:padding="10dp"
|
|
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
|
|
android:id="@+id/tv_food_name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="60dp"
|
|
android:textStyle="bold"
|
|
android:textSize="52sp"
|
|
android:textColor="#FF0A1428"
|
|
android:text="羊肉臊子荞面饸饹" />
|
|
|
|
<FrameLayout
|
|
android:id="@+id/foodDisplayLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="500dp"
|
|
android:layout_marginHorizontal="28dp"
|
|
android:layout_marginTop="100dp"
|
|
android:visibility="visible">
|
|
|
|
<androidx.camera.view.PreviewView
|
|
android:id="@+id/previewView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent" />
|
|
|
|
<com.google.android.material.imageview.ShapeableImageView
|
|
android:id="@+id/iv_img"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:contentDescription="食物图预览"
|
|
android:scaleType="centerCrop"
|
|
app:shapeAppearance="@style/round10dpCornerStyle"
|
|
android:visibility="gone" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_margin="27dp"
|
|
android:background="@drawable/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"
|
|
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>-->
|
|
|
|
<TextView
|
|
android:id="@+id/tvToSearch"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="38dp"
|
|
android:layout_marginBottom="54dp"
|
|
android:padding="10dp"
|
|
android:text="以上都不是,手动搜索"
|
|
android:textStyle="bold"
|
|
android:textColor="#FFFF3232"
|
|
android:textSize="31sp"
|
|
android:visibility="gone"/>
|
|
|
|
<FrameLayout
|
|
android:id="@+id/flPay"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@color/white"
|
|
android:visibility="gone">
|
|
|
|
<androidx.appcompat.widget.AppCompatButton
|
|
android:id="@+id/btnPay"
|
|
android:layout_width="match_parent"
|
|
android:layout_margin="28dp"
|
|
android:layout_height="87dp"
|
|
android:textStyle="bold"
|
|
android:text="去结算"
|
|
android:textSize="35sp"
|
|
android:background="@drawable/bg_btn_save"
|
|
android:textColor="@color/white"/>
|
|
|
|
</FrameLayout>
|
|
|
|
</LinearLayout> |