Dev Pager State Adapter

class DevPagerStateAdapter(    fm: FragmentManager,     lifeCycle: Lifecycle,     fragmentList: List<Fragment>) : FragmentStateAdapter

ViewPager2 Adapter

Author

Jimly A.

Since

14-Jun-21

Parameters

fm

FragmentManager to inflate the fragments

lifeCycle

bind the androidx.viewpager.widget.ViewPager with parent lifeCycle

fragmentList

List Fragments to inflate

Constructors

Link copied to clipboard
fun DevPagerStateAdapter(    fm: FragmentManager,     lifeCycle: Lifecycle,     fragmentList: List<Fragment>)

Functions

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

method to define what fragment inflated

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

method to define how many fragments inflated

Sources

Link copied to clipboard