pull/289/head
gedoor 4 years ago
parent 16b04a33be
commit 0cdad0747e
  1. 11
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt

@ -18,8 +18,8 @@ import io.legado.app.constant.PreferKey
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.SearchBook import io.legado.app.data.entities.SearchBook
import io.legado.app.data.entities.SearchKeyword import io.legado.app.data.entities.SearchKeyword
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.*
import io.legado.app.lib.theme.primaryTextColor import io.legado.app.lib.theme.ColorUtils
import io.legado.app.ui.book.info.BookInfoActivity import io.legado.app.ui.book.info.BookInfoActivity
import io.legado.app.ui.book.source.manage.BookSourceActivity import io.legado.app.ui.book.source.manage.BookSourceActivity
import io.legado.app.ui.widget.recycler.LoadMoreView import io.legado.app.ui.widget.recycler.LoadMoreView
@ -163,11 +163,16 @@ class SearchActivity : VMBaseActivity<SearchViewModel>(R.layout.activity_book_se
} }
private fun initOtherView() { private fun initOtherView() {
tv_clear_history.onClick { viewModel.clearHistory() } fb_stop.backgroundTintList =
Selector.colorBuild()
.setDefaultColor(accentColor)
.setPressedColor(ColorUtils.darkenColor(accentColor))
.create()
fb_stop.onClick { fb_stop.onClick {
viewModel.stop() viewModel.stop()
refresh_progress_bar.isAutoLoading = false refresh_progress_bar.isAutoLoading = false
} }
tv_clear_history.onClick { viewModel.clearHistory() }
} }
private fun initLiveData() { private fun initLiveData() {

Loading…
Cancel
Save