Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

SimpleOnPageChangeListener

open class SimpleOnPageChangeListener : ViewPager.OnPageChangeListener
kotlin.Any
   ↳ androidx.viewpager.widget.ViewPager.SimpleOnPageChangeListener

Simple implementation of the OnPageChangeListener interface with stub implementations of each method. Extend this if you do not intend to override every method of OnPageChangeListener.

Summary

Public constructors

Simple implementation of the OnPageChangeListener interface with stub implementations of each method.

Public methods

open Unit

open Unit
onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int)

open Unit
onPageSelected(position: Int)

Public constructors

<init>

SimpleOnPageChangeListener()

Simple implementation of the OnPageChangeListener interface with stub implementations of each method. Extend this if you do not intend to override every method of OnPageChangeListener.

Public methods

onPageScrollStateChanged

open fun onPageScrollStateChanged(state: Int): Unit

onPageScrolled

open fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int): Unit

onPageSelected

open fun onPageSelected(position: Int): Unit