orangy
01/08/2021, 2:20 PMandroidx.compose.material.Text
vs androidx.compose.foundation.Text
🙂 Not that big deal, but since I use a lot of Image
components, the foundation’s Text comes into place in almost every situation. Do you plan to bring some order into packages/components?jim
01/08/2021, 2:30 PMandroidx.compose.foundation.Text
is there? It should be androidx.compose.material.Text
and androidx.compose.foundation.text.BasicText
IIRC. The former understands material terminology, themes, etc. The later is design-system-agnostic and used as a building block for material as well as any other design system that wants to provide a text widget.foundation
is design system agnostic and may require a bit more work to use, but more general purpose / foundational for any design system. Anything in material
is highly opinionated and design system specific.orangy
01/08/2021, 2:36 PMpackage androidx.compose.foundation
…
@Deprecated(
message = "Use androidx.compose.material.Text for a high level Text component that " +
"consumes theming information, or androidx.compose.foundation.text.BasicText for a basic " +
"unopinionated component that does not have default theming",
replaceWith = ReplaceWith(
"Text(text, modifier, color, fontSize, fontStyle, fontWeight, fontFamily, " +
"letterSpacing, textDecoration, textAlign, lineHeight, overflow, softWrap, maxLines, " +
"onTextLayout, style)",
"androidx.compose.material.Text"
)
)
@Composable
fun Text(
It’s deprecated, but it is still therejim
01/08/2021, 2:39 PM1.0
release.orangy
01/08/2021, 2:40 PMjim
01/08/2021, 2:47 PMSiyamed
01/08/2021, 8:55 PM