Skip to content
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

Image Gallery Preloader Issues #14084

Open
1 task done
Informate opened this issue Jul 17, 2024 · 1 comment
Open
1 task done

Image Gallery Preloader Issues #14084

Informate opened this issue Jul 17, 2024 · 1 comment
Labels
bug needs triage This issue hasn't been reviewed by maintainers

Comments

@Informate
Copy link

Informate commented Jul 17, 2024

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

I am creating an Image Gallery with remote images using ImageView.
I have a local default image to show while images are loading.
I am preloading the image to speed up the gallery swiping.
To preload the images I put them in an ImageView with {visibility: false, width: 0, height: 0}, in this way when I call them they should be already cached and show up immediately when I change the image in the original gallery image. (gallery.image=...)

Maybe this is just the wrong way to do it and I have to use separate ImageView and do not reuse the same object.
I am not posting the code because it is very complex.

This happens on Android, still not tested on iOS (Maybe changing approach and will never be test).

Expected Behavior

The images appears correctly.

Actual behavior

While the images are loading if I swipe to an another image the default image do not shows up and the image is partially shown without the not loaded part.

Reproducible sample

x

Steps to reproduce

x

Platform

Android & iOS

SDK version you are using

12.3.0

Alloy version you are using

No response

@Informate Informate added bug needs triage This issue hasn't been reviewed by maintainers labels Jul 17, 2024
@m1ga
Copy link
Contributor

m1ga commented Jul 17, 2024

This sounds more like an implementation issue and not a SDK bug. If it is a bug please try to create a simple example so we can test it.
You don't say how you created your gallery or any other infos. Is it a ScrollableView?

I wouldn't create ImageViews to preload the images, I would download them and if you have the local file you show it, if not show the preview image and wait until the image is downloaded and then replace it. Or your API should provide multiple sizes and you show a smaller version right away and then higher version behind the "small" imageview. When that is ready hide the "small" imageview.

Or try other imageviews like https://github.com/AndreaVitale/av.imageview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage This issue hasn't been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

2 participants