Hi, can you tell me if i can change the width indi...
# compose
p
Hi, can you tell me if i can change the width indicator of scrollable tab row to be the same length as text?
Copy code
ScrollableTabRow(
                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