0Pricing
Android Academy · Lesson

Text and Column Basics

Show and stack content.

The Text Composable

The most basic thing you can show in Compose is text. The Text composable draws a string on the screen.

You pass the string you want to display as the first argument. That's all it takes to put words on screen.

@Composable
fun Hello() {
    Text("Hello, Android!")
}

Styling Text

Text accepts parameters to change its look. You can set fontSize, color, and fontWeight.

Sizes use the sp unit, which scales with the user's font settings. This keeps your app readable for everyone.

Text(
    "Big Title",
    fontSize = 24.sp,
    fontWeight = FontWeight.Bold
)

All lessons in this course

  1. What a Composable Is
  2. Text and Column Basics
  3. Previewing Your UI
  4. Building a Profile Card
← Back to Android Academy