https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
h

Hai Hoang

02/25/2024, 10:43 AM
Hello, I have an image that have height 200px contained in a Box have height 100px. I want to show only a 100px tall section of an image and do not want that Image got scale How can I do that. Here is my code: _Box_( Modifier._height_(systemBarsPadding.calculateTopPadding() + 52.dp)._zIndex_(10f) ._fillMaxWidth_() ) { _Image_( modifier = Modifier._fillMaxWidth_()._aspectRatio_(375f / 154f), painter = image, contentScale = ContentScale.FillWidth ) }
j

Jeff Lockhart

02/25/2024, 3:36 PM
This would be a good question for #compose.
h

Hai Hoang

02/25/2024, 5:09 PM
Okay, I posted in #compose , thank you