-
- All Implemented Interfaces:
-
androidx.viewpager2.adapter.StatefulAdapter
public abstract class SlidingTabLayoutMediator.SlidingTabPageAdapter extends FragmentStateAdapter
-
-
Constructor Summary
Constructors Constructor Description SlidingTabLayoutMediator.SlidingTabPageAdapter(FragmentActivity fragmentActivity)SlidingTabLayoutMediator.SlidingTabPageAdapter(Fragment fragment)SlidingTabLayoutMediator.SlidingTabPageAdapter(FragmentManager fragmentManager, Lifecycle lifecycle)
-
Method Summary
Modifier and Type Method Description DrawablegetDrawable(int position)Returns the specified position icon. abstract CharSequencegetPageTitle(int position)This method may be called by the ViewPager2 to obtain a title stringto describe the specified page. -
Methods inherited from class androidx.viewpager2.adapter.FragmentStateAdapter
containsItem, createFragment, getItemId, onAttachedToRecyclerView, onBindViewHolder, onCreateViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewRecycled, restoreState, saveState, setHasStableIds -
Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter
bindViewHolder, createViewHolder, getItemCount, getItemViewType, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onCreateViewHolder, onViewDetachedFromWindow, registerAdapterDataObserver, unregisterAdapterDataObserver -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
SlidingTabLayoutMediator.SlidingTabPageAdapter
SlidingTabLayoutMediator.SlidingTabPageAdapter(FragmentActivity fragmentActivity)
-
SlidingTabLayoutMediator.SlidingTabPageAdapter
SlidingTabLayoutMediator.SlidingTabPageAdapter(Fragment fragment)
-
SlidingTabLayoutMediator.SlidingTabPageAdapter
SlidingTabLayoutMediator.SlidingTabPageAdapter(FragmentManager fragmentManager, Lifecycle lifecycle)
-
-
Method Detail
-
getDrawable
@Nullable() Drawable getDrawable(int position)
Returns the specified position icon.
-
getPageTitle
abstract CharSequence getPageTitle(int position)
This method may be called by the ViewPager2 to obtain a title stringto describe the specified page. This method may return nullindicating no title for this page. The default implementation returnsnull.
- Parameters:
position- The position of the title requested
-
-
-
-