GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Wrong image on recyclerview · Issue #107 · Piasy/BigImageViewer

Wrong image on recyclerview #107

New issue
Copy link
New issue
Copy link
Closed
Closed
Wrong image on recyclerview#107
Copy link

Description

@SmasSive
SmasSive
opened on Aug 9, 2018
Issue body actions

Hi!
First of all thanks for this great lib! 👍

I'm using BIV like a gallery, in a recyclerview with a viewpager behaviour and the viewholder is basically a BigImageView, the question is that when I'm paginating there is a page that shows a previous image while progress is shown and once the right image is ready, it is shown correctly.

What I expect is that while the image is downloading, no previous image is shown but only the progress.

I've tried to do a cancel() in the onViewRecycled method of the adapter but with no success... I've read also that another solution could be to do a setImageDrawable(null) but AFAIK I don't have access to the ImageView right?

What can I do? If you need more info please ask me!
Thanks a lot!!!

Activity

  1. SmasSive commented on Aug 9, 2018

    @SmasSive
    SmasSive
    on Aug 9, 2018
    ContributorAuthor
    More actions

    I've managed this by doing the following:

    • On onViewRecycled method from adapter I call a holder method named clear()
    • That holder.clear() is a method that gets the SubsamplingScaleImageView and then calls to recycle()

    Adapter

      override fun onViewRecycled(holder: GlideGalleryViewHolder) {
        holder.clear()
      }

    ViewHolder

      fun clear() {
        itemView.itemImage.ssiv.recycle()
      }

    But I don't know if it's a good practice or it's ok. Could you please give me your opinion? Thanks!

  2. Piasy commented on Aug 9, 2018

    @Piasy
    Piasy
    on Aug 9, 2018
    Owner
    More actions

    I think that's a good way to solve this problem.

    Reacted by Sergi Castillo
  3. Piasy commented on Aug 10, 2018

    @Piasy
    Piasy
    on Aug 10, 2018
    Owner
    More actions

    @SmasSive I think calling ssiv.recycle() at onBindViewHolder is another option.

    Reacted by Sergi Castillo and kinkenrin
  4. Piasy
    closed this as completedon Aug 10, 2018
  5. batadamnjanovic commented on Aug 14, 2023

    @batadamnjanovic
    batadamnjanovic
    on Aug 14, 2023
    More actions

    Did anyone managed to recycle() a ssiv in RecyclerView with ViewPager successfully?

    Calling ssiv.recycle() does not work as expected.

  6. batadamnjanovic commented on Aug 15, 2023

    @batadamnjanovic
    batadamnjanovic
    on Aug 15, 2023
    More actions

    I was managed to make it work by hiding a BigImageView in onBindViewHolder and to show it when onMainImageShown callback is triggered.
    ssiv.recycle() didn't work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.