TabLayoutMediator.TabConfigurationStrategy

public static interface TabLayoutMediator.TabConfigurationStrategy

com.google.android.material.tabs.TabLayoutMediator.TabConfigurationStrategy


A callback interface that must be implemented to set the text and styling of newly created tabs.

Summary

Public methods

abstract void onConfigureTab(TabLayout.Tab tab, int position)

Called to configure the tab for the page at the specified position.

Public methods

onConfigureTab

public abstract void onConfigureTab (TabLayout.Tab tab, 
                int position)

Called to configure the tab for the page at the specified position. Typically calls TabLayout.Tab.setText(CharSequence), but any form of styling can be applied.

Parameters
tab TabLayout.Tab: The Tab which should be configured to represent the title of the item at the given position in the data set.

position int: The position of the item within the adapter's data set.