ViewPager.OnAdapterChangeListener


interface ViewPager.OnAdapterChangeListener


Callback interface for responding to adapter changes.

Summary

Public functions

Unit
onAdapterChanged(
    viewPager: ViewPager,
    oldAdapter: PagerAdapter?,
    newAdapter: PagerAdapter?
)

Called when the adapter for the given view pager has changed.

Public functions

onAdapterChanged

Added in 1.1.0
fun onAdapterChanged(
    viewPager: ViewPager,
    oldAdapter: PagerAdapter?,
    newAdapter: PagerAdapter?
): Unit

Called when the adapter for the given view pager has changed.

Parameters
viewPager: ViewPager

ViewPager where the adapter change has happened

oldAdapter: PagerAdapter?

the previously set adapter

newAdapter: PagerAdapter?

the newly set adapter