-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rememberAsyncImagePainter renders nothing when using dragAndDropSource #2150
Comments
If you use |
I just tried it with It seams like it only renders the images when a recomposition happens. screen-20240229-023455.mp4 |
Interesting - if it also happens with |
Its still blank after adding modifier size until the 1st state update. AsyncImage(
model = photo.url,
contentDescription = photo.description,
contentScale = ContentScale.Crop,
modifier = Modifier.size(20.dp, 20.dp),
) The |
I reproduce this issue by applying Modifier.drawWithCache {
val picture = Picture()
onDrawWithContent {
val canvas = Canvas(picture.beginRecording(size.width.toInt(), size.height.toInt()))
draw(this, layoutDirection, canvas, size) {
this@onDrawWithContent.drawContent()
}
picture.endRecording()
drawIntoCanvas { it.nativeCanvas.drawPicture(picture) }
}
} the code is copy from I suppose it cause this issue, but I don't know why. Hope it's useful for you. |
In As a result, it will draw the empty snapshot until next recompose comes. |
I found a similar issue on issue tracker |
Describe the bug
The image is simply rendering nothing. There is nothing in the logs. When I remove the
dragAndDropSource
it works fine.To Reproduce
Logs/Screenshots
Version
I am using a google pixel 6, android 14.
coil-compose = "2.6.0"
activity-compose = "1.7.0"
The text was updated successfully, but these errors were encountered: