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

Hai Hoang

02/25/2024, 5:08 PM
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 ) }
c

Chrimaeon

02/25/2024, 7:49 PM
Please don’t crosspost without reference
2 Views