142 lines
4.9 KiB
XML
142 lines
4.9 KiB
XML
<?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"
|
|
android:layout_height="match_parent"
|
|
android:background="#FFE7EFF8"
|
|
android:gravity="center_horizontal"
|
|
android:orientation="vertical"
|
|
tools:context=".activity.MainActivity"
|
|
tools:theme="@style/Theme.AppCompat.Light.DarkActionBar">
|
|
|
|
|
|
<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" />
|
|
|
|
</FrameLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/tv_food_name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="50dp"
|
|
android:text="羊肉臊子荞面饸饹"
|
|
android:textColor="#FF0A1428"
|
|
android:textSize="52sp"
|
|
android:textStyle="bold" />
|
|
|
|
<FrameLayout
|
|
android:id="@+id/foodDisplayLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="560dp"
|
|
android:layout_marginHorizontal="28dp"
|
|
android:layout_marginTop="80dp"
|
|
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"
|
|
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-->
|
|
</FrameLayout>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/recyclerview"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_marginHorizontal="14dp"
|
|
android:layout_marginTop="42dp"
|
|
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="0dp"
|
|
android:padding="10dp"
|
|
android:text="以上都不是,手动搜索"
|
|
android:textColor="#FFFF3232"
|
|
android:textSize="31sp"
|
|
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"
|
|
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_height="100dp"
|
|
android:layout_margin="32dp"
|
|
android:background="@drawable/bg_btn_save"
|
|
android:text="去结算"
|
|
android:textColor="@color/white"
|
|
android:textSize="40sp"
|
|
android:textStyle="bold" />
|
|
|
|
</FrameLayout>
|
|
|
|
</LinearLayout> |