VastFragmentAdapter

Base fragment adapter for viewpager2.

// Use in activity
// vp2 is viewpager2
vp2.adapter = VastFragmentAdapter(this,ArrayList<Fragment>().apply {
add(BaseVbFragment())
add(BaseVmFragment())
add(BaseVbVmFragment())
})

Constructors

Link copied to clipboard
constructor(activity: FragmentActivity, fragments: MutableList<Fragment>)

Properties

Link copied to clipboard
protected val activity: FragmentActivity

The activity that owns the fragments.

Link copied to clipboard

The fragments in the activity.

Functions

Link copied to clipboard
open override fun createFragment(position: Int): Fragment
Link copied to clipboard
open override fun getItemCount(): Int