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

Colton Idle

04/26/2020, 5:00 PM
Still new to compose, but something I do often in the traditional UI toolkit is set images up using an aspect ratio. We do this on just about every imageview since it scales best across devices sizes, resolutions, etc. Does compose have an easy way to add an imageview to be sized as 16:9, 3:4, 1:1 etc? As per material guidelines:
m

maciejciemiega

04/26/2020, 5:07 PM
@Colton Idle There is a
Modifier.aspectRatio()
that you can apply to an
Image
3
c

Colton Idle

04/26/2020, 5:39 PM
Thank you!
2 Views