- 将内边距设置从统一padding改为水平和底部独立设置 - 增加卡片圆角大小从8dp到12dp提升视觉效果 - 为商品列表添加白色圆角背景提升美观性 - 调整滚动条垂直边距和顶部间距 - 将选中食材和重量显示区域包裹在圆角容器中 - 添加食材名称文本的最大行数和省略效果 - 统一按钮边距使用水平和垂直边距设置 - 动态调整RecyclerView父容器高度适配内容 - 注释掉食材搜索弹窗的默认商品名称传递 - 在食材搜索弹窗中预设测试数据便于调试
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_search_goods_info" />
|
|
|
|
<com.scwang.smart.refresh.footer.ClassicsFooter
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content" />
|
|
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
|
|
|
</LinearLayout> |