Introducing the Huge Icon Collection with 17,043 free icons. Read blog->
UnstyledUI KitUI Blocks
new
CLI
new
DocsBlog
1k+
Documentation
Theming
Unstyled Components
Universal Components
Blog
Component Catalogue
Jetpack Compose Reference
Getting Started
Overview
Installation
Components
Theming
Upcoming Changes
Theming
Android XML Themes
Dynamic Themes
Theme Overrides
Platform Themes
Composable Primitives
Bottom Sheet
Bottom Sheet (Modal)
Button
Checkbox
Checkbox (TriState)
Dialog
Disclosure
Dropdown Menu
Icon
Modal
Progress Indicator
Radio Group
Scroll Area
Separators
Slider
Tab Group
Text
Tooltip
Text Field
Toggle Switch
Styling
ColoredIndication
focusRing
outline
Responsive Design
Stack
currentWindowContainerSize
defaultMinimumComponentInteractiveSize
Modifiers
buildModifier
UnstyledUI Kit
UI Blocks
new
CLI
new
DocsBlog
Compose UI Unit
Compose RuntimeCompose Runtime SaveableCompose Runtime AnnotationCompose UICompose UI GeometryCompose UI GraphicsCompose UI TestCompose UI TextCompose UI UnitCompose AnimationCompose Animation CoreCompose Animation GraphicsCompose FoundationCompose Foundation LayoutMaterial 3 ComposeMaterial 3 AdaptiveMaterial 3 Window Size ClassMaterial ComposeMaterial RippleWear Material 3 ComposeWear Material ComposeWear FoundationWear NavigationGlanceGlance App WidgetGlance Wear TilesCompose TV FoundationCompose TV Material
Classes
  • Constraints
  • Dp
  • DpOffset
  • DpRect
  • DpSize
  • ExperimentalUnitApi
  • IntOffset
  • IntRect
  • IntSize
  • LayoutDirection
  • TextUnit
  • TextUnitType
  • Velocity
Interfaces
  • Density
  • FontScaling
Properties
  • center
  • dp
  • em
  • height
  • isFinite
  • isSpecified
  • isUnspecified
  • size
  • sp
  • width
Functions
  • coerceAtLeast
  • coerceAtMost
  • coerceIn
  • constrain
  • constrainHeight
  • Constraints
  • constrainWidth
  • Density
  • DpOffset
  • DpSize
  • IntOffset
  • IntRect
  • IntSize
  • isSatisfiedBy
  • lerp
  • max
  • min
  • minus
  • offset
  • plus
  • round
  • roundToIntRect
  • roundToIntSize
  • takeOrElse
  • TextUnit
  • times
  • toIntRect
  • toIntSize
  • toOffset
  • toRect
  • toSize
  • Velocity

max

Compose API Reference Compose UI Unit

max

Function

Common
inline fun max(a: Dp, b: Dp): Dp
    On this page
Sponsored By

Reach thousands of Android Developers

How it works

Your logo will be displayed on the landing page and most popular pages across the site

Availability

Maximum spots: 20

Available spots: 18

Become a Sponsor