Replace deprecated setOnPageChangeListener
This commit is contained in:
parent
ebd9399861
commit
04823c8fa4
|
@ -218,7 +218,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||
|
||||
private fun initFragments() {
|
||||
viewpager.adapter = ViewPagerAdapter(this)
|
||||
viewpager.setOnPageChangeListener(object : ViewPager.OnPageChangeListener {
|
||||
viewpager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
|
||||
override fun onPageScrollStateChanged(state: Int) {
|
||||
if (isSearchOpen) {
|
||||
getCurrentFragment().onSearchQueryChanged("")
|
||||
|
|
Loading…
Reference in New Issue