Prev Source
Next Source

Jetpack Compose Basics

original source

A Compose app is made up of composable functions - just regular functions marked with @Composable, which can call other composable functions.

A function is all you need to create a new UI component.

A composable function is a regular function annotated with @Composable.

Most Compose UI elements such as Surface and Text accept an optional modifier parameter. Modifiers tell a UI element how to lay out, display, or behave within its parent layout.

the padding modifier will apply an amount of space around the element it decorates. You can create a padding modifier with Modifier.padding().

There are dozens of modifiers which can be used to align, animate, lay out, make clickable or scrollable, transform, etc.

The three basic standard layout elements in Compose are Column, Row and Box.


Date
January 25, 2023