Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.viewpager:viewpager:1.0.0-rc01

ViewPager.OnAdapterChangeListener

public static interface ViewPager.OnAdapterChangeListener

androidx.viewpager.widget.ViewPager.OnAdapterChangeListener


Callback interface for responding to adapter changes.

Summary

Public methods

abstract void onAdapterChanged(ViewPager viewPager, PagerAdapter oldAdapter, PagerAdapter newAdapter)

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

Public methods

onAdapterChanged

added in version 1.0.0
public abstract void onAdapterChanged (ViewPager viewPager, 
                PagerAdapter oldAdapter, 
                PagerAdapter newAdapter)

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