Skip to content

Glossary: Android with Jetpack Compose

dp (density-independent pixels)

Also written: dp, sp

The unit for sizes and spacing, so 16.dp looks the same on any screen. `sp` is the same for text but also follows the user's font-size setting.

Where the book teaches it

Related terms

modifier