You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesi贸n a prueba de IA

Antes: $249

Currency
$209
Suscr铆bete

Termina en:

2 D铆as
0 Hrs
10 Min
10 Seg
Curso de Jetpack Compose en Android

Curso de Jetpack Compose en Android

Amazon Web Services (AWS)

Amazon Web Services (AWS)

Creaci贸n de Componentes de UI

4/19
Resources

How to create composables on Android using Jetpack Compose?

Defining the identity of a mobile application is essential to offer a coherent and attractive user experience. To achieve this, a design system is the key tool, allowing to establish color schemes, shapes and typographies that cohere the interface. In this context, the use of the Material Design 3 system becomes an efficient strategy to develop Android applications because of its unbalanced integration with native components.

What is Material Design 3 and how are its colors used?

Material Design 3 is an update to Google's design system that provides a uniform framework for creating attractive and functional interfaces. A fundamental aspect of this system is the use of colors, designed with intentionality for different elements:

  • Primary and OnPrimary: define the surface and the text within it, respectively.
  • Secondary and OnSecondary: They work similarly for other secondary elements.
  • Error and Error Container: Used to represent and handle errors.
  • Surface Variables (e.g., Surface, Surface Bright): Used to stand out against backgrounds.

You should explore these colors and how they combine. The purpose and application of each token is explained in detail in the resources, allowing you to differentiate them for correct use.

How to handle typography in Material Design 3?

Typography is a crucial component for conveying messages and establishing visual hierarchies. In Material Design 3, the typographic organization is represented through "tokens", classified from larger to smaller styles:

  1. Display Styles: large and eye-catching, with variants such as Display Large, Medium and Small.
  2. Headlines: Smaller than Display, suitable for prominent titles.
  3. Titles: Indicate sections within the application; series such as Title Large, Medium and Small offer flexibility.
  4. Body: For main content, set with Body Large, Medium and Small.
  5. Label Styles: Small labels useful in menus or chips, available in Large, Medium and Small sizes.

Each type has a clear purpose, which facilitates their choice and application in different application contexts.

How to configure colors and typography with Material Team Builder?

The Material Team Builder is a tool that facilitates the selection of base colors and typographic fonts, controlling the overall appearance of the application. When selecting a source color, the tool automatically generates color schemes for Light and Dark modes, allowing you to experiment with different perceptions:

  • Base color choice: Consider a palette that represents the theme of the app.
  • Font selection: The tool offers varied options such as Roboto or Poppins, suiting the needs of the project.

The choices at this stage will determine the final image of the application, allowing you to export the theme to integrate it into Android projects using Jetpack Compose.

How to integrate the design in Jetpack Compose?

Once the visual theme has been defined, the next step is to integrate the elements into Jetpack Compose:

  1. Exporting the theme: Material Team Builder allows you to export configurations directly for Jetpack Compose, ensuring that colors and fonts are reflected consistently.
  2. Package adaptation: Rename the package and make adjustments to the imported files (colors, themes, fonts) to match the project structures.
  3. Handling Google Fonts: Dynamic font integration requires establishing a vendor and verification certificate.

The correct implementation of these steps ensures that the application respects the visual and functional design guidelines set from the beginning.

With these configurations in place, we can do an initial test of the application to verify the appearance and functionality of Light and Dark Mode. By applying a theme, the aesthetic transformation will be evident, improving the user's visual interaction.

Contributions 3

Questions 1

Sort by:

Want to see more contributions, questions and answers from the community?

Se deber铆a cuidar mucho la pedagog铆a de los cursos. Sin duda eres es un profesional, pero asumir cosas en el proceso de ense帽anza puede dificultar el aprendizaje. Por lo dem谩s, excelente informaci贸n la que nos compartes, muchas gracias Juan.
No se si hice algo mal pero tuve este error:![](https://static.platzi.com/media/user_upload/Screenshot%202024-11-14%20112800-5f20d4fd-e0b8-4bee-a241-29f631a044c3.jpg) Lo solucine agregando estas dependencias: `import androidx.compose.runtime.getValue` `import androidx.compose.runtime.setValue` segun el **by** las necesita <https://developer.android.com/develop/ui/compose/state>
Bro muy buen curso pero sigo con la unica duda de como armastes el archivo libs.versions.toml