I have a FragmentActivity using a ViewPager to serve several fragments. Each is a ListFragment with the following layout:
FragmentActivity
ViewPager
ListFragment
In Kotlin:
(activity?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager).hideSoftInputFromWindow(view?.windowToken,0)