Created
October 14, 2019 14:49
-
-
Save muzafakar/fad6a7a6b8484479772378810cb76054 to your computer and use it in GitHub Desktop.
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
class AdpOnBoarding(fm: FragmentManager, behavior: Int) : FragmentPagerAdapter(fm, behavior) { | |
private val fragments = mutableListOf<Fragment>() | |
fun addItem(fragment: Fragment) { | |
fragments.add(fragment) | |
notifyDataSetChanged() | |
} | |
override fun getItem(position: Int): Fragment = fragments[position] | |
override fun getCount(): Int = fragments.size | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment