Package com. devbase. presentation. viewpager

Defines adapter configuration for ViewPager and ViewPager2

Types

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

ViewPager2 Adapter

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

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

Link copied to clipboard
class TabLayoutConfiguration(var listTitles: List<String>? = null, var listIcon: List<Drawable?>? = null)

class for containing TabLayout configuration

Link copied to clipboard
typealias TabLayoutDeclaration = TabLayoutConfiguration.() -> Unit
Link copied to clipboard
class ViewPagerConfiguration(    var activity: FragmentActivity? = null,     var fragment: Fragment? = null,     var listFragment: List<Fragment> = listOf(),     var tabLayout: TabLayout? = null,     var tabLayoutConfiguration: TabLayoutConfiguration? = null)

class for containing androidx.viewpager2.widget.ViewPager2 configuration

Link copied to clipboard
typealias ViewPagerDeclaration = ViewPagerConfiguration.() -> Unit

Functions

Link copied to clipboard
fun ViewPager2.setup(configuration: ViewPagerDeclaration)

method to configure ViewPager2