From e516824b32448f7ecb4222f23935b8ca434b8f81 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 28 Aug 2019 08:15:32 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/search/SearchActivity.kt | 6 ++++-- app/src/main/res/layout/activity_search.xml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt b/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt index 60478c0b2..c521d56b1 100644 --- a/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt +++ b/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt @@ -15,6 +15,8 @@ import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.primaryTextColor import io.legado.app.ui.bookinfo.BookInfoActivity import io.legado.app.utils.getViewModel +import io.legado.app.utils.invisible +import io.legado.app.utils.visible import kotlinx.android.synthetic.main.activity_search.* import kotlinx.android.synthetic.main.view_search.* import org.jetbrains.anko.sdk27.listeners.onClick @@ -50,8 +52,9 @@ class SearchActivity : VMBaseActivity(R.layout.activity_search) viewModel.search(it, { content_view.showContentView() initData() + fb_stop.visible() }, { - + fb_stop.invisible() }) } return true @@ -61,7 +64,6 @@ class SearchActivity : VMBaseActivity(R.layout.activity_search) if (newText.isNullOrBlank()) viewModel.stop() return false } - }) fb_stop.onClick { viewModel.stop() } } diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index 0450dd548..296dc6b9f 100644 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -38,6 +38,7 @@ android:layout_height="wrap_content" android:layout_margin="16dp" android:src="@drawable/ic_stop_black_24dp" + android:visibility="invisible" app:fabSize="mini" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" />