- 修复 getCookFoodById/deleteCookFood/markSubmittedAndDelete 查询条件缺少 dinnerType, 导致同一 foodId 跨餐次保存时误判已存在、主记录和主辅材数据丢失的问题; 查询键由三元组(canteenId+foodId+cookMode)升级为四元组(+dinnerType) - SamplingModeActivity 构建 FoodRecord 时补充 dinnerType,确保删除操作能精确定位餐次 - SubmitFoodActivity 制作中模式下从数据库加载 goodsList 时预填充调料到 adapter, isCooking=false 时同样预填充前一页面带入的调料数据 - dm_cook_food 表新增 submitState 字段(DB v13),区分手动删除与接口提交删除 - 提交成功后改用 markSubmittedAndDelete 替代 deleteCookFoodAndGoods,正确置 submitState=1 - InitActivity onDestroy 不再停止秤服务,避免进程存活期间秤数据中断 - GoodsItem.isItemClicked 统一改为 isClicked,PrepareFoodActivity 食材选中逻辑同步更新 - AndroidManifest InitActivity 增加 singleTask 及 configChanges 配置 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
122 lines
4.5 KiB
XML
122 lines
4.5 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:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
tools:background="@drawable/bg_other_page">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/llSearchBar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="100dp"
|
|
android:layout_margin="30dp"
|
|
android:background="@drawable/shape_white_30_corners"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<EditText
|
|
android:id="@+id/etInputDish"
|
|
android:layout_width="0dp"
|
|
android:layout_height="80dp"
|
|
android:layout_marginHorizontal="28dp"
|
|
android:layout_weight="1"
|
|
android:autofillHints=""
|
|
android:background="@color/white"
|
|
android:gravity="center"
|
|
android:hint="@string/dish_search_hint"
|
|
android:inputType="text"
|
|
android:imeOptions="actionSearch"
|
|
android:paddingStart="3dp"
|
|
android:paddingEnd="3dp"
|
|
android:textColor="@color/black333"
|
|
android:textColorHint="@color/gray_c8"
|
|
android:textSize="40sp"
|
|
tools:ignore="TextFields" />
|
|
|
|
<ImageView
|
|
android:id="@+id/ivDishSearch"
|
|
android:layout_width="60dp"
|
|
android:layout_height="60dp"
|
|
android:layout_marginStart="20dp"
|
|
android:layout_marginEnd="20dp"
|
|
android:paddingStart="10dp"
|
|
android:paddingEnd="10dp"
|
|
android:visibility="gone"
|
|
android:src="@drawable/ic_search_gray"
|
|
tools:ignore="ContentDescription" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_marginHorizontal="30dp"
|
|
android:layout_weight="1"
|
|
android:background="@drawable/shape_white_30_corners"
|
|
android:orientation="vertical">
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/btnTestConfirm"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="start"
|
|
android:layout_marginVertical="30dp"
|
|
android:layout_marginStart="20dp"
|
|
android:padding="10dp"
|
|
android:text="@string/dish_composition"
|
|
android:textColor="@color/black666"
|
|
android:textSize="28sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvShowWeight"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="80dp"
|
|
android:layout_gravity="end|center_vertical"
|
|
android:paddingHorizontal="30dp"
|
|
android:gravity="center_vertical"
|
|
android:maxLines="1"
|
|
tools:text="称重:0g"
|
|
android:textColor="@color/black666"
|
|
android:textSize="28sp" />
|
|
|
|
<FrameLayout
|
|
android:id="@+id/flCameraContainer"
|
|
android:layout_width="1dp"
|
|
android:layout_height="1dp" />
|
|
|
|
</FrameLayout>
|
|
|
|
<com.yanzhenjie.recyclerview.SwipeRecyclerView
|
|
android:id="@+id/rvMaterialList"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginBottom="20dp"
|
|
android:overScrollMode="never"
|
|
android:scrollbars="vertical"
|
|
tools:itemCount="3"
|
|
tools:listitem="@layout/list_item_food_material" />
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/btnCook"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="90dp"
|
|
android:layout_margin="30dp"
|
|
android:background="@drawable/shape_green_bg"
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
android:gravity="center"
|
|
android:text="@string/goCooking"
|
|
android:textColor="@color/white"
|
|
android:textSize="32sp"
|
|
android:textStyle="bold" />
|
|
<!-- android:background="@drawable/ripple_effect_green"-->
|
|
|
|
</LinearLayout> |