# TabLayoutMediator.TabConfigurationStrategy

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/tabs/TabLayoutMediator.java)

*** ** * ** ***


```
public interface TabLayoutMediator.TabConfigurationStrategy
```

<br />

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/com/google/android/material/tabs/TabLayoutMediator.TabConfigurationStrategy#onConfigureTab(com.google.android.material.tabs.TabLayout.Tab,int)(https://developer.android.com/reference/com/google/android/material/tabs/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 `https://developer.android.com/reference/com/google/android/material/tabs/TabLayout.Tab#setText(java.lang.CharSequence)`, but any form of styling can be applied.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/tabs/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. |