-
Notifications
You must be signed in to change notification settings - Fork 105
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
Remote Image Not Displaying in Showcase Using Coil's AsyncImage #374
Comments
A little bit more information here. Android Studio's preview does not load the image from the network (which is kinda expected) but it shows Showkase does not load the image from the network, but it also does not show the placeholder. |
@narayan07feb @sjaramillo10 I suspect this might be because internet permission isn't added to the |
Thanks for the suggestion @vinaygaba, however we had already configured the internet permission in the Manifest and the issue persists. Not sure if the issue is with Showkase itself, or with how Coil works that is not compatible with how we are using Showkase. Not sure if there is any value in keeping this issue open, so feel free to close it out if you prefer. Thanks again! |
@sjaramillo10 Can you fork this repo and swap out the picasso dependencies from the sample module to Coil - https://github.com/airbnb/Showkase/blob/master/sample/build.gradle#L113 If there's issue with the library, it should be a straightforward repro and then I can investigate more to root cause it. |
@narayan07feb @sjaramillo10 I was able to investigate and I think I know what's going on - Showkase ensures that it conveys that it's a preview environment here (Correct/Intended behavior) - Showkase/showkase/src/main/java/com/airbnb/android/showkase/ui/ShowkaseBrowserApp.kt Line 90 in e21f7b3
It seems like Coil doesn't work as well in preview environment based on this issue - coil-kt/coil#1915. However, it looks like progress is being made to fix it - coil-kt/coil#2266 As a temporary workaround, you can wrap your AsyncImage with this CompositionLocal and that should fix the issue - CompositionLocalProvider(
LocalInspectionMode provides false,
) {
AsyncImage(
model = imageUrl,
contentDescription = null,
modifier = Modifier
.fillMaxWidth()
.height(200.dp)
)
} |
In my component, I am using Coil's AsyncImage. However, everything except for the image appears in the Showcase. I have tried the same component in my code, and it displays everything correctly. Does the Showcase support AsyncImage?
The text was updated successfully, but these errors were encountered: