The second Android 11 Developer Preview is now available, test it out and share your feedback.

TabRow

object TabRow
kotlin.Any
   ↳ androidx.ui.material.TabRow

Summary

Nested classes

data

Data class that contains information about a tab's position on screen

Public methods

Unit
Indicator(modifier: Modifier = Modifier.None, color: Color = contentColor())

Default indicator, which will be positioned at the bottom of the TabRow, on top of the divider.

Unit
IndicatorContainer(tabPositions: List<TabRow.TabPosition>, selectedIndex: Int, indicator: () -> Unit)

Positions and animates the given indicator between tabs when selectedIndex changes.

Public methods

Indicator

@Composable fun Indicator(
    modifier: Modifier = Modifier.None,
    color: Color = contentColor()
): Unit

Default indicator, which will be positioned at the bottom of the TabRow, on top of the divider.

Parameters
modifier: Modifier = Modifier.None modifier for the indicator's layout
color: Color = contentColor() color of the indicator

IndicatorContainer

@Composable fun IndicatorContainer(
    tabPositions: List<TabRow.TabPosition>,
    selectedIndex: Int,
    indicator: () -> Unit
): Unit

Positions and animates the given indicator between tabs when selectedIndex changes.