|
@@ -25,7 +25,7 @@ class SettingsSearchController :
|
|
|
/**
|
|
|
* Adapter containing search results grouped by lang.
|
|
|
*/
|
|
|
- protected var adapter: SettingsSearchAdapter? = null
|
|
|
+ private var adapter: SettingsSearchAdapter? = null
|
|
|
private lateinit var searchView: SearchView
|
|
|
|
|
|
init {
|
|
@@ -54,15 +54,12 @@ class SettingsSearchController :
|
|
|
* @param inflater used to load the menu xml.
|
|
|
*/
|
|
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
|
|
- // Inflate menu.
|
|
|
inflater.inflate(R.menu.settings_main, menu)
|
|
|
|
|
|
// Initialize search menu
|
|
|
val searchItem = menu.findItem(R.id.action_search)
|
|
|
searchView = searchItem.actionView as SearchView
|
|
|
searchView.maxWidth = Int.MAX_VALUE
|
|
|
-
|
|
|
- // Change hint to show "search settings."
|
|
|
searchView.queryHint = applicationContext?.getString(R.string.action_search_settings)
|
|
|
|
|
|
searchItem.expandActionView()
|
|
@@ -102,8 +99,6 @@ class SettingsSearchController :
|
|
|
super.onViewCreated(view)
|
|
|
|
|
|
adapter = SettingsSearchAdapter(this)
|
|
|
-
|
|
|
- // Create recycler and set adapter.
|
|
|
binding.recycler.layoutManager = LinearLayoutManager(view.context)
|
|
|
binding.recycler.adapter = adapter
|
|
|
|