I am using the following code to display an image.
AsyncImage(
model = createImageUrl(audio.image_path),
contentDescription = "Song Artwork",
modifier = Modifier.fillMaxHeight()
.aspectRatio(1f)
.padding(horizontal = 4.dp),
placeholder = rememberVectorPainter(image = Icons.Outlined.MusicNote)
)
The placeholder image is not being shown. Howeve, if I use placeHolder = painterResource(R.drawable.someDrawableInMyResource), the drawable is being shown when image is loaded.
What am I doing wrong?
I found what I was doing wrong. I was in dark theme and the image vector`s tint color matched my background and thus nothing was being shown.
May help someone.
Edit: Well my question changed.. How to change placeholder tint to match my theme?