ui-unit
Functions
  • Constraints
  • Density
  • DpOffset
  • DpSize
  • IntOffset
  • IntRect
  • IntSize
  • TextUnit
  • Velocity
  • coerceAtLeast
  • coerceAtMost
  • coerceIn
  • constrain
  • constrainHeight
  • constrainWidth
  • isSatisfiedBy
  • lerp
  • max
  • min
  • minus
  • offset
  • plus
  • round
  • roundToIntRect
  • roundToIntSize
  • takeOrElse
  • times
  • toIntRect
  • toIntSize
  • toOffset
  • toRect
  • toSize
Interfaces
  • Density
  • FontScaling
Objects
  • ComposeUiUnitFlags
Classes
  • Constraints
  • Dp
  • DpOffset
  • DpRect
  • DpSize
  • ExperimentalUnitApi
  • IntOffset
  • IntRect
  • IntSize
  • LayoutDirection
  • LayoutDirection.Ltr
  • LayoutDirection.Rtl
  • TextUnit
  • TextUnitType
  • Velocity
Properties
  • center
  • dp
  • em
  • height
  • isFinite
  • isSpecified
  • isUnspecified
  • size
  • sp
  • width
Jetpack Compose › Compose UI › ui-unit

ui-unit

Jetpack Compose API reference for ui-unit.

CodeRabbit

CodeRabbit

AI writes the code. CodeRabbit catches the slop.

AdTry CodeRabbit for Free
Robomori

Robomori

Run Android emulators and devices outside Android Studio.

AdTry Robomori
Dependency Functions Interfaces Objects Classes Properties
  • Density

    A density of the screen.

  • FontScaling

    Converts TextUnit to Dp and vice-versa.

Content updated: 2026-11-04

Functions ← Previous Objects Next →
9:41

AGENTS.md vs skills Inbox

Alex Styl 9:30 AMto me

AGENTS.md contains your preferences for how you want your agent to behave.

Think of it as the prompt your agent reads every time it starts.

Mine tells the agent to always read the project's README and CONTRIBUTING files, so it has the context of the repo I'm working on.

Skills on the other hand are repeatable flows you can reuse over and over again.

Architecture is a great candidate for a skill. My compose-architecture skill describes how my app's screens should be built.

One Android lesson, every Wednesday

Building Android apps?

What Alex learned building Android apps for 14 years, so you don't have to. Reads in under a minute.

Join 3,500+ Android developers. Unsubscribe any time.

You're subscribed

The next lesson lands in on Wednesday.