Hey Guys, Any idea on how to change text colour wi...
# compose
b
Hey Guys, Any idea on how to change text colour without recomposing the composable? Think google put out an example to use drawBehind to change the background. Since differing font colour change until the draw phase is not there(At least that I know of). Any directions on this?
h
Color is part of TextStyle in BasicText and there is no way* to bypass recomposition for color change. The good news is though BasicText does not re-layout if only color changes.
If you are not determined on using Text/BasicText, you can drop down to drawText API in DrawScope. There you can change the color in
drawBehind