Dev View Pager Adapter

class DevViewPagerAdapter(    fm: FragmentManager,     listFragment: ArrayList<DevFragment<*>>,     listTitle: ArrayList<String>? = null) : FragmentStatePagerAdapter

Base for Pager adapter, can be used for ViewPager with TabLayout

Author

Jimly A.

Since

01-Jun-20.

Parameters

fm

Fragment Manager to switch between fragment, can be accessed from Activity or another fragment

listFragment

List of Fragment that will be displayed, note : always use inherited class from DevFragment

listTitle

List of String for tab title, nullable

Constructors

Link copied to clipboard
fun DevViewPagerAdapter(    fm: FragmentManager,     listFragment: ArrayList<DevFragment<*>>,     listTitle: ArrayList<String>? = null)

create new instance of DevViewPagerAdapter

Functions

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

Method get how many fragment attached to this adapter

Link copied to clipboard
open override fun getItem(position: Int): DevFragment<*>

Method to display fragment from selected position

Link copied to clipboard
open override fun getPageTitle(position: Int): CharSequence?

Method to get page title

Sources

Link copied to clipboard