0Pricing
Jetpack Compose Academy · Aula

Scaffold: A Estrutura da Tela

Configure os espaços do layout padrão do aplicativo.

Scaffold: A Estrutura da Tela é uma aula grátis de Jetpack Compose Academy no CoddyKit. Esta é a aula 1 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Jetpack Compose Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Jetpack Compose Academy inclui 4 aulas no total.

Partes desta aula ainda não foram traduzidas e aparecem em inglês.

Meet Scaffold

Most app screens share the same skeleton: a bar on top, content in the middle, maybe a button floating below. Scaffold gives you all of that in one Composable. 🏗️

Why Not Just a Column?

You could hand-build bars with a Column, but you would re-solve insets, spacing, and overlaps every time. Scaffold wires those standard pieces together for you.

The Slot Idea

Scaffold works with slots: named spots where you drop a Composable. You fill the slots you want and leave the rest empty.

The content Slot

The one slot you almost always use is content. It is the main body of your screen, and Scaffold hands it the right padding to use.

Scaffold { innerPadding ->
    Text("Hello", Modifier.padding(innerPadding))
}

Honor innerPadding

That innerPadding keeps your content from hiding under bars. Always apply it to your top-level content, or text can slip beneath the app bar.

The topBar Slot

Drop a bar into the topBar slot and Scaffold pins it to the top, then shrinks the content area so nothing overlaps.

Scaffold(
    topBar = { TopAppBar(title = { Text("Home") }) }
) { padding -> }

More Slots Available

Scaffold also offers bottomBar, floatingActionButton, and snackbarHost slots. You will meet each one in this course.

Leave Slots Empty

Every slot is optional. A Scaffold with only content is perfectly valid, so you add bars only when a screen actually needs them.

One Scaffold Per Screen

The usual rule is one Scaffold per screen. It frames that whole screen, while smaller Composables fill its content slot.

Scaffold Is Material 3

Import Scaffold from androidx.compose.material3 so its colors and spacing match the rest of your Material You theme.

import androidx.compose.material3.Scaffold

containerColor

Set containerColor to paint the screen background behind every slot. Skip it and Scaffold uses your theme's surface color by default.

Quick Check

What is the safest thing to do with the value Scaffold passes to its content lambda?

Recap

Scaffold is your screen skeleton: fill named slots like content and topBar, honor innerPadding, and use one per screen. Next you will style the top bar. 👍

Perguntas Frequentes

A aula “Scaffold: A Estrutura da Tela” é grátis?

Sim — o texto completo de “Scaffold: A Estrutura da Tela” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Jetpack Compose Academy, atualize para CoddyKit PRO. O curso de Jetpack Compose Academy inclui 4 aulas no total.

O que vou aprender em “Scaffold: A Estrutura da Tela”?

Configure os espaços do layout padrão do aplicativo. Você pratica Jetpack Compose Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.

Preciso ter experiência prévia para começar Jetpack Compose Academy?

Nenhuma experiência prévia é necessária. Jetpack Compose Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 1 de 4.

Quanto tempo leva a aula “Scaffold: A Estrutura da Tela”?

A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.

Posso escrever e executar código nesta aula de Jetpack Compose Academy?

Sim. Cada aula de Jetpack Compose Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.

Todas as aulas deste curso

  1. Scaffold: A Estrutura da Tela
  2. TopAppBar e Ícones de Ação
  3. Barras Inferiores e Botões de Ação Flutuantes
  4. Snackbars e SnackbarHostState
← Voltar para Jetpack Compose Academy