https://kotlinlang.org logo
#compose
Title
# compose
c

Colton Idle

10/05/2021, 11:37 PM
Does anyone know how to go from the default TabRow indicator to something that only stretches for the length of the text itself? https://stackoverflow.com/questions/65581582/scrollabletabrow-indicator-width-to-match-text-inside-tab
f

Fabio

10/05/2021, 11:58 PM
the problem with that is that the size of that thing has to change when you change tabs
and from top of my memory these guys are not even siblings. I once had to display the indicator with a particular shape. But the size was 1/n for a n tabs screen. You'd have to do some sort of storing all text widths, then computing the offset for each indicator for each position. Then transition from offset (0) to offset(1) to offset(2) smoothly when it's scrolling.
5 Views