为搜索二级界面添加菜单功能

This commit is contained in:
HapeLee committed 2025-10-20 01:16:05 +08:00
1 parent 407b20d891
commit e67481fcf6
6 files changed
+139 -54

No files matched your search

@@ -109,6 +109,7 @@
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:menu="@menu/book_search"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -123,6 +124,31 @@
android:orientation="vertical"
android:visibility="visible">
<com.google.android.material.chip.ChipGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginHorizontal="16dp">
<com.google.android.material.chip.Chip
android:id="@+id/chip_precision_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checkable="true"
android:text="@string/precision_search"/>
<com.google.android.material.chip.Chip
android:id="@+id/chip_search_scope"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:text="@string/search_scope"/>
<com.google.android.material.chip.Chip
android:id="@+id/chip_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:text="@string/search_select_group"/>
</com.google.android.material.chip.ChipGroup>
<TextView
android:id="@+id/tv_book_show"
android:layout_width="match_parent"
@@ -144,8 +170,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingTop="4dp">
android:paddingHorizontal="16dp">
<TextView
android:id="@+id/tv_history"
+1 -1
View File
@@ -16,7 +16,7 @@
<item
android:id="@+id/menu_search_scope"
android:title="@string/groups_or_source"
android:title="@string/search_scope"
app:showAsAction="never" />
<item
+1
View File
@@ -1299,4 +1299,5 @@
<string name="tip_custom_mode">切换至自定义主题或调整自定义设置时,部分选项需要重启。</string>
<string name="restart_required_message">此更改需要重启应用才能生效,是否立即重启?</string>
<string name="restart_later_message">更改将在下次启动应用时生效</string>
<string name="search_select_group">选择书源分组</string>
</resources>
+1
View File
@@ -1300,4 +1300,5 @@
<string name="tip_custom_mode">切换至自定义主题或调整自定义设置时,部分选项需要重启。</string>
<string name="restart_required_message">修改该选项需要重启</string>
<string name="restart_later_message">稍后重启</string>
<string name="search_select_group">选择书源分组</string>
</resources>