SupportPageAdapter

abstract class SupportPageAdapter(fragmentManager: FragmentManager, defaultBehavior: Int = BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) : FragmentStatePagerAdapter

If FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT is passed in, then only the current Fragment is in the androidx.lifecycle.Lifecycle.State.RESUMED state, while all other fragments are capped at androidx.lifecycle.Lifecycle.State.STARTED.

If FragmentStatePagerAdapter.BEHAVIOR_SET_USER_VISIBLE_HINT is used, then all fragments are in the androidx.lifecycle.Lifecycle.State.RESUMED state and there will be callbacks to androidx.fragment.app.Fragment.setUserVisibleHint.

Since

v0.9.X

Parameters

fragmentManager

Fragment manager that will interact with this adapter

Constructors

Link copied to clipboard
constructor(fragmentManager: FragmentManager, defaultBehavior: Int = BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun destroyItem(@NonNull p0: ViewGroup, p1: Int, @NonNull p2: Any)
open fun destroyItem(@NonNull p0: View, p1: Int, @NonNull p2: Any)
Link copied to clipboard
open override fun finishUpdate(@NonNull p0: ViewGroup)
open fun finishUpdate(@NonNull p0: View)
Link copied to clipboard
open override fun getCount(): Int

Return the number of views available.

Link copied to clipboard
abstract override fun getItem(position: Int): Fragment

Return the Fragment associated with a specified position.

Link copied to clipboard
open fun getItemPosition(@NonNull p0: Any): Int
Link copied to clipboard
open override fun getPageTitle(position: Int): CharSequence

This method may be called by the ViewPager to obtain a title string to describe the specified page. This method may return null indicating no title for this page. The default implementation returns null.

Link copied to clipboard
open fun getPageWidth(p0: Int): Float
Link copied to clipboard
open override fun instantiateItem(@NonNull p0: ViewGroup, p1: Int): Any
open fun instantiateItem(@NonNull p0: View, p1: Int): Any
Link copied to clipboard
open override fun isViewFromObject(@NonNull p0: View, @NonNull p1: Any): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun restoreState(@Nullable p0: Parcelable?, @Nullable p1: ClassLoader?)
Link copied to clipboard
open override fun saveState(): Parcelable?
Link copied to clipboard
open fun setPagerTitles(context: Context, @ArrayRes titleRes: Int)

Sets the given array resources as standard strings titles

Link copied to clipboard
open override fun setPrimaryItem(@NonNull p0: ViewGroup, p1: Int, @NonNull p2: Any)
open fun setPrimaryItem(@NonNull p0: View, p1: Int, @NonNull p2: Any)
Link copied to clipboard
open override fun startUpdate(@NonNull p0: ViewGroup)
open fun startUpdate(@NonNull p0: View)