Stay organized with collections
Save and categorize content based on your preferences.
Extension functions summary
Modifier |
Attempts to size the original content rectangle to be inscribed into a destination by applying a specified ContentScale type.
|
Extension functions
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-15 UTC."],[],[],null,["# androidx.media3.ui.compose.modifiers\n====================================\n\nExtension functions summary\n---------------------------\n\n|------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Modifier](/reference/kotlin/androidx/compose/ui/Modifier) | `@`[UnstableApi](/reference/kotlin/androidx/media3/common/util/UnstableApi) `@`[Composable](/reference/kotlin/androidx/compose/runtime/Composable) [Modifier](/reference/kotlin/androidx/compose/ui/Modifier)`.`[resizeWithContentScale](/reference/kotlin/androidx/media3/ui/compose/modifiers/package-summary#(androidx.compose.ui.Modifier).resizeWithContentScale(androidx.compose.ui.layout.ContentScale,androidx.compose.ui.geometry.Size,androidx.compose.ui.unit.Density))`(` ` contentScale: `[ContentScale](/reference/kotlin/androidx/compose/ui/layout/ContentScale)`,` ` sourceSizeDp: `[Size](/reference/kotlin/androidx/compose/ui/geometry/Size)`?,` ` density: `[Density](/reference/kotlin/androidx/compose/ui/unit/Density) `)` Attempts to size the original content rectangle to be inscribed into a destination by applying a specified [ContentScale](/reference/kotlin/androidx/compose/ui/layout/ContentScale) type. |\n\nExtension functions\n-------------------\n\n### resizeWithContentScale\n\nArtifact: [androidx.media3:media3-ui-compose](/jetpack/androidx/releases/media3) \n[View Source](https://cs.android.com/search?q=file:androidx/media3/ui/compose/modifiers/extensions.kt+function:resizeWithContentScale) \n\n```\n@UnstableApi\n@Composable\nfun Modifier.resizeWithContentScale(\n contentScale: ContentScale,\n sourceSizeDp: Size?,\n density: Density = LocalDensity.current\n): Modifier\n```\n\nAttempts to size the original content rectangle to be inscribed into a destination by applying a specified [ContentScale](/reference/kotlin/androidx/compose/ui/layout/ContentScale) type."]]