Code Monkey home page Code Monkey logo

Comments (14)

sTin avatar sTin commented on August 15, 2024

Even though there is no imageview but only layout, this phenomenon is occured. I think this problem is related with Staggeredgridview library. But it is hard to pick what exactly problem is.

from staggeredgridview.

maurycyw avatar maurycyw commented on August 15, 2024

Thank you will take a look

from staggeredgridview.

songzhiyong avatar songzhiyong commented on August 15, 2024

If the size of the data collection up to 80 or more ,scroll to the bottom then back to the top,column will offset some distance

from staggeredgridview.

davidschreiber avatar davidschreiber commented on August 15, 2024

Hello there,

I'm experiencing a similar problem. Layouting ImageViews inside the StaggeredGridView (about 100) and scrolling up and down causes the columns (currently two) to shift against each other. This effect gets visible when scrolling back to the upside. One of both columns won't start at the top most point.

I will dive into this and see if a can find something.

Greetings.

from staggeredgridview.

BenMoment avatar BenMoment commented on August 15, 2024

@maurycyw any news on this possibly?

from staggeredgridview.

davidschreiber avatar davidschreiber commented on August 15, 2024

I have spottet the problem in my case (don't know if it is the same with you): Since StaggeredGridView aligns all views inside a column with their respective margin it is important to keep the height of all views inside this columns stay the same while scrolling. In my case I used ImageViews which have some loading problems. Sometimes the image views are not displayed when scrolling from the top to the bottom. Sometimes the same ImageView is displayed when scrolling back. This causes all the other views above this image view to get pushed up (because the only thing that stays consistent is the margin between the views, not their size).

To fix this behaviour, I would have to ensure my ImageViews load proper, or the containing views (I have some LinearLayout) that are placed inside the StaggeredGridView keep the same height independent of their content.

So, it seems in my case this behaviour is reasonable. Probably it could something similar with your problems?

Greetings David

from staggeredgridview.

BenMoment avatar BenMoment commented on August 15, 2024

Hi David. Thanks for your answer. That is a similar case with me too... Problem is my images have dynamic sizes which I don't know before lazily loading them. So I need a better solution. Trying to figure one out...

from staggeredgridview.

jarvisv avatar jarvisv commented on August 15, 2024

@BenMoment, did you find a solution? I am facing the same issue and am trying to figure out a way but no luck so far. If you did find something that works would love to hear what you had to do to get things to work! Thanks!

from staggeredgridview.

BenMoment avatar BenMoment commented on August 15, 2024

@jarvisv I ended up rewriting a staggered grid view that is based on a ListView with multiple cell views (ViewCount is larger), that actually recycles the views pretty well. This project is still too experimental...

from staggeredgridview.

jarvisv avatar jarvisv commented on August 15, 2024

@BenMoment, thanks for the reply. I might end up doing the same too.

from staggeredgridview.

santhoshkumaar avatar santhoshkumaar commented on August 15, 2024

I am facing same problem... If any one find solution, please update here......

from staggeredgridview.

briangriffey avatar briangriffey commented on August 15, 2024

@BenMoment @jarvisv If you guys are lazy loading an image view, try measuring the view before setting the image. I use Jake Wharton's AspectRatioImageView with the dominant measurement being the width of the view. https://gist.github.com/JakeWharton/2856179

from staggeredgridview.

siddharthmdoshi avatar siddharthmdoshi commented on August 15, 2024

@briangriffey
https://gist.github.com/JakeWharton/2856179
is that working??
bcz when i use this not affected
and still problem create plz give me solution for this

from staggeredgridview.

vicianm avatar vicianm commented on August 15, 2024

Many issues are caused by caching in onMeasure(). This one seems to be the same problem.

Have a look at #89

from staggeredgridview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.