mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 04:49:15 +01:00
Scrolling a recycler now collapses the keyboard
This commit is contained in:
parent
bd9069b585
commit
fcb9445f02
@ -427,6 +427,12 @@ fun Controller.scrollViewWith(
|
||||
if (recycler.canScrollVertically(-1) && !elevate) elevateFunc(true)
|
||||
else if (!recycler.canScrollVertically(-1) && elevate) elevateFunc(false)
|
||||
}
|
||||
} else if (newState == RecyclerView.SCROLL_STATE_DRAGGING) {
|
||||
val view = activity?.window?.currentFocus ?: return
|
||||
val imm =
|
||||
activity?.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager
|
||||
?: return
|
||||
imm.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user