- 新增 GoodsItem 纯数据类(DTO),整合接口字段与原 CookFoodGoodsEntity @Ignore UI 状态字段 - ApiService/RemoteRepository/NetViewModel 合并 queryGoodsList 与 querySeasoningList 为统一接口 - GoodsInfoSearchAdapter/FoodSearchAdapter/DishPartAdapter 实体类改为 GoodsItem - FoodSearchDialog/FoodRecognizeDialog/FoodRecognizeActivity/VectorCollectionFragment 改用 GoodsItem - PrepareFoodActivity.list 改为 GoodsItem,loadDishDetail 加 toGoodsItem() 转换,采集模式传 SubmitFoodActivity 前转回 CookFoodGoodsEntity - CookFoodGoodsEntity 删除所有 @Ignore 字段,新增 toGoodsItem() 转换方法 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
99 lines
3.7 KiB
XML
99 lines
3.7 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="wrap_content"
|
|
android:gravity="center_horizontal"
|
|
tools:background="@color/white"
|
|
android:orientation="vertical">
|
|
|
|
<View
|
|
android:id="@+id/viewLine"
|
|
android:layout_width="90dp"
|
|
android:layout_height="10dp"
|
|
android:layout_marginTop="30dp"
|
|
android:background="@drawable/shape_gray_dc_5" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvSheetName"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="50dp"
|
|
android:textColor="@color/black333"
|
|
android:textSize="36sp"
|
|
android:textStyle="bold"
|
|
tools:text="调料检索" />
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="100dp"
|
|
android:layout_marginStart="60dp"
|
|
android:layout_marginTop="50dp"
|
|
android:layout_marginEnd="60dp"
|
|
android:background="@drawable/shape_gray_f8_15"
|
|
android:gravity="center_vertical">
|
|
|
|
<EditText
|
|
android:id="@+id/etSheetInput"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="start|center_vertical"
|
|
android:background="@null"
|
|
android:ellipsize="end"
|
|
android:gravity="center_vertical"
|
|
android:imeOptions="actionSearch"
|
|
android:inputType="text"
|
|
android:maxLines="1"
|
|
android:paddingStart="30dp"
|
|
android:paddingEnd="30dp"
|
|
android:textColor="@color/black666"
|
|
android:textColorHint="@color/gray_c8"
|
|
android:textSize="36sp"
|
|
tools:hint="@string/input_seasoning_name"
|
|
tools:ignore="Autofill,LabelFor,TextFields" />
|
|
|
|
<ImageView
|
|
android:id="@+id/ivSearch"
|
|
android:layout_width="60dp"
|
|
android:layout_height="60dp"
|
|
android:layout_gravity="end|center_vertical"
|
|
android:layout_marginEnd="20dp"
|
|
android:padding="10dp"
|
|
android:src="@drawable/ic_search_gray"
|
|
tools:ignore="ContentDescription" />
|
|
</FrameLayout>
|
|
|
|
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
|
android:id="@+id/refreshLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="700dp"
|
|
android:layout_marginTop="10dp"
|
|
app:srlEnableOverScrollDrag="false">
|
|
|
|
<com.scwang.smart.refresh.header.ClassicsHeader
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/recyclerView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginStart="45dp"
|
|
android:layout_marginTop="15dp"
|
|
android:layout_marginEnd="45dp"
|
|
android:layout_marginBottom="15dp"
|
|
android:nestedScrollingEnabled="true"
|
|
android:minHeight="380dp"
|
|
android:overScrollMode="never"
|
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
|
app:spanCount="2"
|
|
tools:itemCount="10"
|
|
tools:listitem="@layout/list_item_food" />
|
|
|
|
<com.scwang.smart.refresh.footer.ClassicsFooter
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content" />
|
|
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
|
|
|
</LinearLayout> |