Piotr
01/05/2021, 12:45 PMScrollableTabRow(
selectedTabIndex = selectedSeason,
backgroundColor = Color.White,
edgePadding = 0.dp,
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 24.dp),
indicator = { tabPositions ->
TabDefaults.Indicator(
color = Color.Red,
height = 4.dp,
modifier = Modifier .tabIndicatorOffset(tabPositions[selectedSeason])
.fillMaxWidth()
)
}
) {
item.seasonList().forEachIndexed { index, contentItem ->
Tab(
modifier = Modifier.padding(bottom = 10.dp),
selected = index == selectedSeason,
onClick = { selectedSeason = index }
)
{
Text(
"Season "+ contentItem.seasonNumber(),
color = Color.Black,
style = MaterialTheme.typography.h1
)
}
}
}
For some reason i cannot achieve this effect, and for now it looks like the attached screenshot