kotlin中的addOnPageChangeListener方法实现

guide_viewpager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener{

    override fun onPageScrollStateChanged(state: Int) { }

    override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { }

    override fun onPageSelected(position: Int) { }

})

你可能感兴趣的:(kotlin中的addOnPageChangeListener方法实现)