lsjwzh / RecyclerViewPager

Deprecated
Apache License 2.0
3.53k stars 667 forks source link

"onPageSelected" missing #196

Open AndroidDeveloperLB opened 6 years ago

AndroidDeveloperLB commented 6 years ago

On a ViewPager, we have this callback:

https://developer.android.com/reference/android/support/v4/view/ViewPager.html#addOnPageChangeListener(android.support.v4.view.ViewPager.OnPageChangeListener)

It has a function called "onPageSelected" , which lets you know which page is about to be selected, before it goes to idle state of scrolling (meaning right when it's settling).

In case you want to know it after it finished scrolling, you can use setPrimaryItem of the adapter of the ViewPager.

Here it's missing. All I've found is addOnPageChangedListener , but it's a callback that's called after the scrolling/settling has finished .

Please add this functionality. Also please try to make it have similar API to ViewPager.