Update README.md with image resource path (#510)

The loading "images from resources" specifies that the image is placed in `resources/images` however the loading of the resource does not reflect this path.
This commit is contained in:
Steyn Geldenhuys
2021-03-20 14:51:11 +01:00
committed by GitHub
parent dc428d3a22
commit 4769b2f8e9

View File

@@ -20,7 +20,7 @@ import androidx.compose.ui.res.imageResource
fun main() {
Window {
Image(
bitmap = imageResource("sample.png"), // ImageBitmap
bitmap = imageResource("images/sample.png"), // ImageBitmap
contentDescription = "Sample",
modifier = Modifier.fillMaxSize()
)
@@ -391,4 +391,4 @@ fun main() {
}
```
![Loading XML vector images](loading_xml_vector_images.png)
![Loading XML vector images](loading_xml_vector_images.png)