# compose

Cody Engel

10/24/2019, 4:25 AM
Has anyone gotten a
to display an image yet? I feel like I’m missing something very simple…
Copy code
val resource = +vectorResource(R.drawable.ic_baseline_add)
        FloatingActionButton(icon = resource) // takes an Image instead of Vector, how does one convert a Vector to an Image with Compose?

Andrey Kulikov

10/24/2019, 9:35 AM
There is one more variant of FloatingActionButton with the compostable lamda as a last Param. with use of it you can emit any content. For example the vector image, so you would need a Container and DrawVector component, please take a look how it works in this example