Text(
"Text with background",
Modifier.drawBackground(Color.Magenta, RectangleShape).padding(10.dp)
)
Text(
"Text with background",
Modifier.padding(10.dp).drawBackground(Color.Magenta, RectangleShape)
)
图 link 不上,我贴个 stackoverflow 的地址: https://stackoverflow.com/questions/62017566/jetpack-compose-text-show-confuse
我看 apk 最终的代码,也是很迷