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