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

Callback ImageLoader called twice #53

Open
wpbloger opened this issue Jul 29, 2020 · 0 comments
Open

Callback ImageLoader called twice #53

wpbloger opened this issue Jul 29, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wpbloger
Copy link

Describe the bug
The first time you call StfalconImageViewer.show(), the method used to load the image is called 2 times, because of this, the image may suddenly disappear / appear again, which is not nice.
This happens only on the first call, if you scroll through the gallery with gestures, then one call occurs as it should be.

To Reproduce
Steps to reproduce the behavior:
I tried running the demo there this error is reproducible as well.
To do this, just open file "com.stfalcon.sample.features.demo.grid.PostersGridDemoActivity" and replace method "loadPosterImage" to the following code:

    private fun loadPosterImage(imageView: ImageView, poster: Poster?) {
        Log.e("TEST", "loadPosterImage - "+poster?.url)
        imageView.apply {
            background = getDrawableCompat(R.drawable.shape_placeholder)
            loadImage(poster?.url)
        }
    }

Then we start the emulator (api 29), go to this window, open the console to display our error, clear it to remove the outputs loaded in the image grid.
We open any image in the grid, and we see on the console that the open image was loaded 2 times, that is, the callback was called twice.

@wpbloger wpbloger added the bug Something isn't working label Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants