FragmentStateAdapter

constructor(@NonNull fragmentActivity: FragmentActivity)

Parameters

fragmentActivity

if the ViewPager2 lives directly in a FragmentActivity subclass.

See also


constructor(@NonNull fragment: Fragment)

Parameters

fragment

if the ViewPager2 lives directly in a Fragment subclass.

See also


constructor(@NonNull fragmentManager: FragmentManager, @NonNull lifecycle: Lifecycle)

Parameters

fragmentManager

of ViewPager2's host

lifecycle

of ViewPager2's host

See also