mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
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:
@@ -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() {
|
||||
}
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
Reference in New Issue
Block a user