mirror of
https://github.com/gedoor/legado.git
synced 2024-09-03 09:55:00 +08:00
搜索添加搜索范围可选择单个书源和分组,未完成
This commit is contained in:
parent
bd2cc750c0
commit
691071d4de
@ -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…
Reference in New Issue
Block a user