Component - Text composable
The Text composable in Jetpack Compose displays a short piece of text on the screen. It is like a label or a sign that shows words to the user.
The Text composable in Jetpack Compose displays a short piece of text on the screen. It is like a label or a sign that shows words to the user.
Column └── Text
Text composable in Jetpack Compose?content parameter. D uses lambda syntax which is incorrect for Text.Text(text = "Welcome", fontSize = 24.sp, color = Color.Red)
fontSize parameter sets the text size, and color sets the text color. Both are valid for Text composable.Text(text = Hello World)
text is correct. Text composable can display multiple words. fontSize is optional.isMorning. Which code correctly uses the Text composable to show "Good Morning" in green if isMorning is true, otherwise "Good Evening" in blue?if (condition) value1 else value2 for inline conditions, not the ternary operator.Pass the test and this pattern moves unknown