VastFragmentAdapter
open class VastFragmentAdapter(val activity: FragmentActivity, val fragments: MutableList<Fragment>) : FragmentStateAdapter
Base fragment adapter for viewpager2.
// Use in activity
// vp2 is viewpager2
vp2.adapter = VastFragmentAdapter(this,ArrayList<Fragment>().apply {
add(BaseVbFragment())
add(BaseVmFragment())
add(BaseVbVmFragment())
})
Content copied to clipboard
Properties
Link copied to clipboard
The activity that owns the fragments.
Link copied to clipboard
The fragments in the activity.