moving searchQueryChanged to MyViewPagerFragment
This commit is contained in:
parent
ebd65dd134
commit
989e68227a
|
@ -209,12 +209,12 @@ class MainActivity : SimpleActivity() {
|
|||
|
||||
main_menu.onSearchClosedListener = {
|
||||
getAllFragments().forEach {
|
||||
(it as? ItemOperationsListener)?.searchQueryChanged("")
|
||||
it?.searchQueryChanged("")
|
||||
}
|
||||
}
|
||||
|
||||
main_menu.onSearchTextChangedListener = { text ->
|
||||
(getCurrentFragment() as? ItemOperationsListener)?.searchQueryChanged(text)
|
||||
getCurrentFragment()?.searchQueryChanged(text)
|
||||
}
|
||||
|
||||
main_menu.getToolbar().setOnMenuItemClickListener { menuItem ->
|
||||
|
|
|
@ -123,7 +123,7 @@ class MimeTypesActivity : SimpleActivity(), ItemOperationsListener {
|
|||
|
||||
override fun selectedPaths(paths: ArrayList<String>) {}
|
||||
|
||||
override fun searchQueryChanged(text: String) {
|
||||
fun searchQueryChanged(text: String) {
|
||||
val searchText = text.trim()
|
||||
lastSearchedText = searchText
|
||||
when {
|
||||
|
|
|
@ -66,4 +66,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||
abstract fun onResume(textColor: Int)
|
||||
|
||||
abstract fun refreshFragment()
|
||||
|
||||
abstract fun searchQueryChanged(text: String)
|
||||
}
|
||||
|
|
|
@ -221,4 +221,8 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun searchQueryChanged(text: String) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,6 @@ interface ItemOperationsListener {
|
|||
|
||||
fun selectedPaths(paths: ArrayList<String>)
|
||||
|
||||
fun searchQueryChanged(text: String)
|
||||
|
||||
fun setupDateTimeFormat()
|
||||
|
||||
fun setupFontSize()
|
||||
|
|
Loading…
Reference in New Issue