TabLayoutMediator.TabConfigurationStrategy


Kotlin |Java

public interface 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

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

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

Parameters
TabLayout.Tab tab

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

int position

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

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026年05月14日 UTC.