Created
September 22, 2020 14:33
-
-
Save jaozinfs/58dfff87b3486647996cfc0f693e2f8c to your computer and use it in GitHub Desktop.
Cria uma classe com callback para avisar quando trocar de pagina do ViewPager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inner class SlideTrailersCallback : ViewPager2.OnPageChangeCallback() { | |
override fun onPageSelected(position: Int) { | |
super.onPageSelected(position) | |
startSlide() | |
} | |
} | |
pager.registerOnPageChangeCallback(SlideTrailersCallback()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment