Introduction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

One of the core ideas behind Jetpack Compose is composability, which means you can build your user interfaces by combining smaller reusable components, like Lego bricks.

In Compose, when you build a component, it’s a modular, self-contained piece of UI. You describe what the UI looks like in a given state, and the framework takes care of updating it if the state changes. While the UI toolkit allows for customization and reuse, when building custom views in XML, you inherit all of the logic from existing views before extending them.

In this lesson, you’ll learn about components. You’ll first explore some of the most commonly used UI components that Jetpack Compose ships with and then work through a hands-on demo to break your UI into reusable components.

You’ll learn how to:

  • Use the Image component.
  • Use the Button component.
  • Use the Switch component.
  • Break up a monolith screen into smaller reusable components.
See forum comments
Download course materials from Github
Previous: Quiz: Use Text Next: Instruction