pull/32/head
kunfei 5 years ago
parent cc8212ac8c
commit e516824b32
  1. 6
      app/src/main/java/io/legado/app/ui/search/SearchActivity.kt
  2. 1
      app/src/main/res/layout/activity_search.xml

@ -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<SearchViewModel>(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<SearchViewModel>(R.layout.activity_search)
if (newText.isNullOrBlank()) viewModel.stop()
return false
}
})
fb_stop.onClick { viewModel.stop() }
}

@ -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" />

Loading…
Cancel
Save