|
|
|
@ -25,7 +25,9 @@ class BookSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, BookS |
|
|
|
|
override val viewModel by viewModels<BookSourceDebugModel>() |
|
|
|
|
|
|
|
|
|
private lateinit var adapter: BookSourceDebugAdapter |
|
|
|
|
private lateinit var searchView: SearchView |
|
|
|
|
private val searchView: SearchView by lazy { |
|
|
|
|
binding.titleBar.findViewById(R.id.search_view) |
|
|
|
|
} |
|
|
|
|
private val qrCodeResult = registerForActivityResult(QrCodeResult()) { |
|
|
|
|
it?.let { |
|
|
|
|
startSearch(it) |
|
|
|
@ -33,7 +35,6 @@ class BookSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, BookS |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onActivityCreated(savedInstanceState: Bundle?) { |
|
|
|
|
searchView = binding.titleBar.findViewById(R.id.search_view) |
|
|
|
|
initRecyclerView() |
|
|
|
|
initSearchView() |
|
|
|
|
viewModel.init(intent.getStringExtra("key")) { |
|
|
|
@ -75,6 +76,7 @@ class BookSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, BookS |
|
|
|
|
searchView.setOnQueryTextFocusChangeListener { _, hasFocus -> |
|
|
|
|
openOrCloseHelp(hasFocus) |
|
|
|
|
} |
|
|
|
|
openOrCloseHelp(true) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@SuppressLint("SetTextI18n") |
|
|
|
|