Files
PowerBell/stallhelper/src/main/res/layout/activity_task_scheduler.xml
T
aBuild 4a0fbf024d 任务列表顶部添加搜索框,支持中文/拼音/拼音首字母搜索
- 新增搜索框 EditText,输入时实时过滤任务列表
- 引入 pinyin4j 库,支持中文全拼和首字母搜索
- matchesSearch 匹配任务名称:中文原文 / 全拼 / 首字母
- 抽取 applyChanges() 统一排序、过滤、保存逻辑
- Adapter 新增 setData() 方法支持动态更新数据
2026-05-22 19:35:26 +08:00

51 lines
1.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/activityBackgroundColor">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/toolbarBackgroundColor"
android:id="@+id/toolbar"/>
<EditText
android:id="@+id/et_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="搜索任务名称(支持中文/拼音)"
android:padding="10dp"
android:background="@android:drawable/edit_text"
android:layout_margin="10dp"
android:inputType="text"
android:singleLine="true"/>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:padding="10dp"
android:id="@+id/task_scheduler_recycler_view"/>
</LinearLayout>
<Button
android:id="@+id/fab_add_task"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:background="@color/colorPrimaryDark"
android:text="+"
android:textColor="@android:color/white"
android:textSize="24sp"/>
</FrameLayout>