Package-level declarations
Types
Link copied to clipboard
Similar in behavior to FragmentStatePagerAdapter Lifecycle within RecyclerView:
- RecyclerView.ViewHolder initially an empty FrameLayout, serves as a re-usable container for a Fragment in later stages.
- onBindViewHolder we ask for a Fragment for the position. If we already have the fragment, or have previously saved its state, we use those.
- onAttachedToWindow we attach the Fragment to a container.
- onViewRecycled we remove, save state, destroy the Fragment.
Link copied to clipboard
ViewHolder implementation for handling Fragments.
Link copied to clipboard
interface StatefulAdapter
interface StatefulAdapter
ViewPager2 adapters should implement this interface to be called during onSaveInstanceState and onRestoreInstanceState