- 修改 RecyclerView 高度设置以改进布局 - 更新颜色值,移除 alpha 通道简化颜色定义 - 重构调味配置界面布局,提升视觉效果 - 调整项目条目样式,包括文字颜色和字体粗细 - 更新分割线为 Material Divider 组件 - 统一调整文本颜色和大小以增强可读性 - 优化调味网格适配器中的文字颜色显示 - 调整布局间距和尺寸参数以改善界面美观 - 优化重量数据显示,增加小数位数控制功能
54 lines
1.9 KiB
XML
54 lines
1.9 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"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:background="@color/white"
|
|
android:orientation="vertical">
|
|
|
|
<!-- 搜索栏 -->
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="100dp"
|
|
android:layout_marginHorizontal="32dp"
|
|
android:layout_marginTop="32dp"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<EditText
|
|
android:id="@+id/editSearch"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@drawable/setting_border_gray3"
|
|
android:gravity="center_vertical"
|
|
android:hint="输入食材名称"
|
|
android:imeOptions="actionSearch"
|
|
android:inputType="text"
|
|
android:maxLines="1"
|
|
android:paddingStart="47dp"
|
|
android:paddingEnd="80dp"
|
|
android:textColor="@color/black"
|
|
android:textColorHint="#FFC4CFDA"
|
|
android:textSize="36sp" />
|
|
|
|
<ImageView
|
|
android:id="@+id/btnSearch"
|
|
android:layout_width="60dp"
|
|
android:layout_height="60dp"
|
|
android:layout_gravity="end|center_vertical"
|
|
android:layout_marginEnd="15dp"
|
|
android:padding="10dp"
|
|
android:src="@drawable/ic_search2"
|
|
tools:ignore="ContentDescription" />
|
|
</FrameLayout>
|
|
|
|
<!-- 已采集食材列表 -->
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/rvCollectedFood"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:overScrollMode="never"
|
|
tools:itemCount="5"
|
|
tools:listitem="@layout/list_item_collected_food" />
|
|
|
|
</LinearLayout>
|