Muh Rahmatullah
11/18/2019, 4:26 PMSimpleImage
wrapped inside a Container
. code like this
Container(width = 62.dp, height = 42.dp) {
SimpleImage(image = image)
}
Bruno_
11/18/2019, 5:10 PM@Composable
fun SimpleImage(
image: Image,
tint: Color? = null
) {
// TODO b/132071873: WithDensity should be able to use the DSL syntax
WithDensity(block = {
Container(width = image.width.toDp(), height = image.height.toDp()) {
DrawImage(image, tint)
}
})
}
Muh Rahmatullah
11/18/2019, 5:18 PMAnna-Chiara Bellini [G]
11/18/2019, 6:55 PMMuh Rahmatullah
11/19/2019, 4:53 AM