搜索添加搜索范围可选择单个书源和分组,未完成

pull/2410/head
kunfei 2 years ago
parent bd2cc750c0
commit 691071d4de
  1. 16
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt
  2. 1
      app/src/main/res/layout/activity_book_search.xml
  3. 1
      app/src/main/res/values-es-rES/strings.xml
  4. 1
      app/src/main/res/values-ja-rJP/strings.xml
  5. 1
      app/src/main/res/values-pt-rBR/strings.xml
  6. 1
      app/src/main/res/values-zh-rHK/strings.xml
  7. 1
      app/src/main/res/values-zh-rTW/strings.xml
  8. 1
      app/src/main/res/values-zh/strings.xml
  9. 1
      app/src/main/res/values/strings.xml

@ -224,7 +224,8 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel
viewModel.stop()
binding.refreshProgressBar.isAutoLoading = false
}
binding.tvClearHistory.setOnClickListener { viewModel.clearHistory() }
binding.tvToggleSearchScope.setOnClickListener { alertSearchScope() }
binding.tvClearHistory.setOnClickListener { alertClearHistory() }
}
private fun initData() {
@ -405,6 +406,19 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel
viewModel.deleteHistory(searchKeyword)
}
private fun alertSearchScope() {
}
private fun alertClearHistory() {
alert(R.string.draw) {
setMessage(R.string.sure_clear_search_history)
yesButton {
viewModel.clearHistory()
}
noButton()
}
}
companion object {

@ -60,6 +60,7 @@
android:text="@string/search_scope" />
<TextView
android:id="@+id/tv_toggle_search_scope"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"

@ -1042,4 +1042,5 @@
<string name="restore_last_book_process">是否恢复到跳转前的阅读进度?</string>
<string name="search_scope">搜索范围</string>
<string name="toggle_search_scope">切换</string>
<string name="sure_clear_search_history">是否确认清除所有搜索历史记录</string>
</resources>

@ -1045,4 +1045,5 @@
<string name="restore_last_book_process">是否恢复到跳转前的阅读进度?</string>
<string name="search_scope">搜索范围</string>
<string name="toggle_search_scope">切换</string>
<string name="sure_clear_search_history">是否确认清除所有搜索历史记录</string>
</resources>

@ -1045,4 +1045,5 @@
<string name="restore_last_book_process">是否恢复到跳转前的阅读进度?</string>
<string name="search_scope">搜索范围</string>
<string name="toggle_search_scope">切换</string>
<string name="sure_clear_search_history">是否确认清除所有搜索历史记录</string>
</resources>

@ -1042,4 +1042,5 @@
<string name="restore_last_book_process">是否恢复到跳转前的阅读进度?</string>
<string name="search_scope">搜索范围</string>
<string name="toggle_search_scope">切换</string>
<string name="sure_clear_search_history">是否确认清除所有搜索历史记录</string>
</resources>

@ -1044,4 +1044,5 @@
<string name="restore_last_book_process">是否恢复到跳转前的阅读进度?</string>
<string name="search_scope">搜索范围</string>
<string name="toggle_search_scope">切换</string>
<string name="sure_clear_search_history">是否确认清除所有搜索历史记录</string>
</resources>

@ -1044,4 +1044,5 @@
<string name="restore_last_book_process">是否恢复到跳转前的阅读进度?</string>
<string name="search_scope">搜索范围</string>
<string name="toggle_search_scope">切换</string>
<string name="sure_clear_search_history">是否确认清除所有搜索历史记录</string>
</resources>

@ -1045,4 +1045,5 @@
<string name="restore_last_book_process">是否恢复到跳转前的阅读进度?</string>
<string name="search_scope">搜索范围</string>
<string name="toggle_search_scope">切换</string>
<string name="sure_clear_search_history">是否确认清除所有搜索历史记录</string>
</resources>

Loading…
Cancel
Save