Replace deprecated setOnPageChangeListener

This commit is contained in:
Nikola Trubitsyn 2018-01-30 14:11:51 +03:00
parent ebd9399861
commit 04823c8fa4
1 changed files with 1 additions and 1 deletions

View File

@ -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("")