TabRowDefaults
object TabRowDefaults
Summary
Public functions |
|
|---|---|
Unit |
@ComposableAdds a pill indicator behind the tab |
Unit |
Space between tabs in the tab row |
Unit |
@ComposableAdds an underlined indicator below the tab |
Color |
Default accent color for the TabRow |
Public properties |
|
|---|---|
Color |
Color of the background of a tab |
Public functions
PillIndicator
@Composable
fun PillIndicator(
currentTabPosition: DpRect,
doesTabRowHaveFocus: Boolean,
modifier: Modifier = Modifier,
activeColor: Color = MaterialTheme.colorScheme.onSurface,
inactiveColor: Color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.4f)
): Unit
Adds a pill indicator behind the tab
| Parameters | |
|---|---|
currentTabPosition: DpRect |
position of the current selected tab |
doesTabRowHaveFocus: Boolean |
whether any tab in TabRow is focused |
modifier: Modifier = Modifier |
modifier to be applied to the indicator |
activeColor: Color = MaterialTheme.colorScheme.onSurface |
color of indicator when |
inactiveColor: Color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.4f) |
color of indicator when |
UnderlinedIndicator
@Composable
fun UnderlinedIndicator(
currentTabPosition: DpRect,
doesTabRowHaveFocus: Boolean,
modifier: Modifier = Modifier,
activeColor: Color = MaterialTheme.colorScheme.primary,
inactiveColor: Color = MaterialTheme.colorScheme.secondary
): Unit
Adds an underlined indicator below the tab
| Parameters | |
|---|---|
currentTabPosition: DpRect |
position of the current selected tab |
doesTabRowHaveFocus: Boolean |
whether any tab in TabRow is focused |
modifier: Modifier = Modifier |
modifier to be applied to the indicator |
activeColor: Color = MaterialTheme.colorScheme.primary |
color of indicator when |
inactiveColor: Color = MaterialTheme.colorScheme.secondary |
color of indicator when |
contentColor
@Composable
fun contentColor(): Color
Default accent color for the TabRow